/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * RecipeFrame.java
 *
 * Created on Feb 22, 2011, 4:21:01 PM
 */

package gbbmgmt;

import java.util.*;
import org.jdesktop.application.Action;
import javax.swing.JOptionPane;
import javax.swing.table.*;
import java.text.*;
import javax.swing.JMenuItem;
import javax.swing.JPopupMenu;
import java.awt.event.MouseEvent;
import javax.swing.*;
import java.awt.event.*;

/**
 *
 * @author dchapman
 */
public class RecipeFrame extends javax.swing.JFrame {

    //Variables for calculations.
    public ArrayList<String[]> Malt;
    public ArrayList<String[]> Yeast;
    public ArrayList<String[]> Hops;
    public ArrayList<String[]> Recipes;

    //Create Number Formater for displaying numbers.
    public NumberFormat f = new DecimalFormat("#0.00");
    public NumberFormat f2 = new DecimalFormat("#0");
    public NumberFormat f3 = new DecimalFormat("#0.000");


    /** Creates new form RecipeFrame */
    public RecipeFrame() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jComboBoxRecipe = new javax.swing.JComboBox();
        jButtonCustFirst = new javax.swing.JButton();
        jButtonCustPrev = new javax.swing.JButton();
        jButtonCustNext = new javax.swing.JButton();
        jButtonCustLast = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jTextFieldRName = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        jTextFieldTG = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        jTextFieldVol = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jTextFieldRRev = new javax.swing.JTextField();
        jButtonSubmitRecipe = new javax.swing.JButton();
        jButtonPrint = new javax.swing.JButton();
        jLabel33 = new javax.swing.JLabel();
        jSeparator1 = new javax.swing.JSeparator();
        jLabel34 = new javax.swing.JLabel();
        jLabelRecipeID = new javax.swing.JLabel();
        jLabel35 = new javax.swing.JLabel();
        jLabelRIBU = new javax.swing.JLabel();
        jLabel36 = new javax.swing.JLabel();
        jLabelRSRM = new javax.swing.JLabel();
        jSeparator2 = new javax.swing.JSeparator();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jComboBoxMalt1 = new javax.swing.JComboBox();
        jTextFieldMPct1 = new javax.swing.JTextField();
        jLabel8 = new javax.swing.JLabel();
        jComboBoxMalt2 = new javax.swing.JComboBox();
        jTextFieldMPct2 = new javax.swing.JTextField();
        jComboBoxMalt3 = new javax.swing.JComboBox();
        jTextFieldMPct3 = new javax.swing.JTextField();
        jComboBoxMalt4 = new javax.swing.JComboBox();
        jComboBoxMalt5 = new javax.swing.JComboBox();
        jComboBoxMalt6 = new javax.swing.JComboBox();
        jComboBoxMalt7 = new javax.swing.JComboBox();
        jComboBoxMalt8 = new javax.swing.JComboBox();
        jTextFieldMPct4 = new javax.swing.JTextField();
        jTextFieldMPct5 = new javax.swing.JTextField();
        jTextFieldMPct6 = new javax.swing.JTextField();
        jTextFieldMPct7 = new javax.swing.JTextField();
        jTextFieldMPct8 = new javax.swing.JTextField();
        jComboBoxMalt9 = new javax.swing.JComboBox();
        jTextFieldMPct9 = new javax.swing.JTextField();
        jComboBoxMalt10 = new javax.swing.JComboBox();
        jTextFieldMPct10 = new javax.swing.JTextField();
        jSeparator3 = new javax.swing.JSeparator();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jComboBoxHop1 = new javax.swing.JComboBox();
        jComboBoxHop2 = new javax.swing.JComboBox();
        jComboBoxHop3 = new javax.swing.JComboBox();
        jComboBoxHop4 = new javax.swing.JComboBox();
        jComboBoxHop5 = new javax.swing.JComboBox();
        jComboBoxHop6 = new javax.swing.JComboBox();
        jComboBoxHop7 = new javax.swing.JComboBox();
        jComboBoxHop8 = new javax.swing.JComboBox();
        jComboBoxHop9 = new javax.swing.JComboBox();
        jComboBoxHop10 = new javax.swing.JComboBox();
        jTextFieldHopTime10 = new javax.swing.JTextField();
        jTextFieldHopLbs10 = new javax.swing.JTextField();
        jTextFieldHopLbs9 = new javax.swing.JTextField();
        jTextFieldHopTime9 = new javax.swing.JTextField();
        jTextFieldHopTime8 = new javax.swing.JTextField();
        jTextFieldHopLbs8 = new javax.swing.JTextField();
        jTextFieldHopLbs7 = new javax.swing.JTextField();
        jTextFieldHopTime7 = new javax.swing.JTextField();
        jTextFieldHopTime6 = new javax.swing.JTextField();
        jTextFieldHopLbs6 = new javax.swing.JTextField();
        jTextFieldHopLbs5 = new javax.swing.JTextField();
        jTextFieldHopTime5 = new javax.swing.JTextField();
        jTextFieldHopTime4 = new javax.swing.JTextField();
        jTextFieldHopLbs4 = new javax.swing.JTextField();
        jTextFieldHopLbs3 = new javax.swing.JTextField();
        jTextFieldHopTime3 = new javax.swing.JTextField();
        jTextFieldHopTime2 = new javax.swing.JTextField();
        jTextFieldHopLbs2 = new javax.swing.JTextField();
        jTextFieldHopLbs1 = new javax.swing.JTextField();
        jTextFieldHopTime1 = new javax.swing.JTextField();
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jCheckBoxHop1FWH = new javax.swing.JCheckBox();
        jCheckBoxHop2FWH = new javax.swing.JCheckBox();
        jSeparator4 = new javax.swing.JSeparator();
        jLabel13 = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        jTextFieldGyp = new javax.swing.JTextField();
        jLabel17 = new javax.swing.JLabel();
        jTextFieldCaCl = new javax.swing.JTextField();
        jLabel18 = new javax.swing.JLabel();
        jTextFieldEpsom = new javax.swing.JTextField();
        jLabel19 = new javax.swing.JLabel();
        jTextFieldChalk = new javax.swing.JTextField();
        jLabel20 = new javax.swing.JLabel();
        jTextFieldNaCl = new javax.swing.JTextField();
        jSeparator5 = new javax.swing.JSeparator();
        jLabel21 = new javax.swing.JLabel();
        jLabel22 = new javax.swing.JLabel();
        jTextFieldRatio = new javax.swing.JTextField();
        jLabel24 = new javax.swing.JLabel();
        jLabel23 = new javax.swing.JLabel();
        jTextFieldTargetTemp = new javax.swing.JTextField();
        jLabel25 = new javax.swing.JLabel();
        jSeparator6 = new javax.swing.JSeparator();
        jLabel26 = new javax.swing.JLabel();
        jComboBoxYeast = new javax.swing.JComboBox();
        jLabel28 = new javax.swing.JLabel();
        jTextFieldPTemp = new javax.swing.JTextField();
        jLabel27 = new javax.swing.JLabel();
        jSeparator7 = new javax.swing.JSeparator();
        jLabel29 = new javax.swing.JLabel();
        jLabel30 = new javax.swing.JLabel();
        jComboBoxDHop1 = new javax.swing.JComboBox();
        jComboBoxDHop2 = new javax.swing.JComboBox();
        jComboBoxDHop3 = new javax.swing.JComboBox();
        jComboBoxDHop4 = new javax.swing.JComboBox();
        jTextFieldDHopDay4 = new javax.swing.JTextField();
        jTextFieldDHopDay3 = new javax.swing.JTextField();
        jTextFieldDHopDay2 = new javax.swing.JTextField();
        jTextFieldDHopDay1 = new javax.swing.JTextField();
        jLabel32 = new javax.swing.JLabel();
        jLabel31 = new javax.swing.JLabel();
        jTextFieldDHopLbs1 = new javax.swing.JTextField();
        jTextFieldDHopLbs2 = new javax.swing.JTextField();
        jTextFieldDHopLbs3 = new javax.swing.JTextField();
        jTextFieldDHopLbs4 = new javax.swing.JTextField();
        jSeparator8 = new javax.swing.JSeparator();
        jButtonExit = new javax.swing.JButton();
        jButtonUpdateRecipe = new javax.swing.JButton();
        jButtonNewRecipe = new javax.swing.JButton();
        jButtonNewRev = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setName("Form"); // NOI18N

        jComboBoxRecipe.setName("jComboBoxRecipe"); // NOI18N
        jComboBoxRecipe.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jComboBoxRecipeMouseClicked(evt);
            }
        });
        jComboBoxRecipe.addPopupMenuListener(new javax.swing.event.PopupMenuListener() {
            public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) {
            }
            public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {
                jComboBoxRecipePopupMenuWillBecomeInvisible(evt);
            }
            public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) {
            }
        });
        jComboBoxRecipe.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                jComboBoxRecipeItemStateChanged(evt);
            }
        });

        javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(gbbmgmt.GBBMGMTApp.class).getContext().getActionMap(RecipeFrame.class, this);
        jButtonCustFirst.setAction(actionMap.get("FirstRecord")); // NOI18N
        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(gbbmgmt.GBBMGMTApp.class).getContext().getResourceMap(RecipeFrame.class);
        jButtonCustFirst.setText(resourceMap.getString("jButtonCustFirst.text")); // NOI18N
        jButtonCustFirst.setName("jButtonCustFirst"); // NOI18N

        jButtonCustPrev.setAction(actionMap.get("PrevRecord")); // NOI18N
        jButtonCustPrev.setText(resourceMap.getString("jButtonCustPrev.text")); // NOI18N
        jButtonCustPrev.setName("jButtonCustPrev"); // NOI18N

        jButtonCustNext.setAction(actionMap.get("NextRecord")); // NOI18N
        jButtonCustNext.setText(resourceMap.getString("jButtonCustNext.text")); // NOI18N
        jButtonCustNext.setName("jButtonCustNext"); // NOI18N

        jButtonCustLast.setAction(actionMap.get("LastRecord")); // NOI18N
        jButtonCustLast.setText(resourceMap.getString("jButtonCustLast.text")); // NOI18N
        jButtonCustLast.setName("jButtonCustLast"); // NOI18N

        jScrollPane1.setName("jScrollPane1"); // NOI18N

        jPanel1.setName("jPanel1"); // NOI18N

        jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N

        jTextFieldRName.setText(resourceMap.getString("jTextFieldRName.text")); // NOI18N
        jTextFieldRName.setName("jTextFieldRName"); // NOI18N

        jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
        jLabel2.setName("jLabel2"); // NOI18N

        jTextFieldTG.setText(resourceMap.getString("jTextFieldTG.text")); // NOI18N
        jTextFieldTG.setName("jTextFieldTG"); // NOI18N

        jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
        jLabel3.setName("jLabel3"); // NOI18N

        jTextFieldVol.setText(resourceMap.getString("jTextFieldVol.text")); // NOI18N
        jTextFieldVol.setName("jTextFieldVol"); // NOI18N

        jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
        jLabel4.setName("jLabel4"); // NOI18N

        jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N
        jLabel5.setName("jLabel5"); // NOI18N

        jTextFieldRRev.setEditable(false);
        jTextFieldRRev.setText(resourceMap.getString("jTextFieldRRev.text")); // NOI18N
        jTextFieldRRev.setName("jTextFieldRRev"); // NOI18N

        jButtonSubmitRecipe.setAction(actionMap.get("SubmitRecipeData")); // NOI18N
        jButtonSubmitRecipe.setText(resourceMap.getString("jButtonSubmitRecipe.text")); // NOI18N
        jButtonSubmitRecipe.setName("jButtonSubmitRecipe"); // NOI18N

        jButtonPrint.setAction(actionMap.get("PrintRecipe")); // NOI18N
        jButtonPrint.setText(resourceMap.getString("jButtonPrint.text")); // NOI18N
        jButtonPrint.setName("jButtonPrint"); // NOI18N

        jLabel33.setFont(resourceMap.getFont("jLabel33.font")); // NOI18N
        jLabel33.setText(resourceMap.getString("jLabel33.text")); // NOI18N
        jLabel33.setName("jLabel33"); // NOI18N

        jSeparator1.setName("jSeparator1"); // NOI18N

        jLabel34.setText(resourceMap.getString("jLabel34.text")); // NOI18N
        jLabel34.setName("jLabel34"); // NOI18N

        jLabelRecipeID.setText(resourceMap.getString("jLabelRecipeID.text")); // NOI18N
        jLabelRecipeID.setName("jLabelRecipeID"); // NOI18N

        jLabel35.setText(resourceMap.getString("jLabel35.text")); // NOI18N
        jLabel35.setName("jLabel35"); // NOI18N

        jLabelRIBU.setText(resourceMap.getString("jLabelRIBU.text")); // NOI18N
        jLabelRIBU.setName("jLabelRIBU"); // NOI18N

        jLabel36.setText(resourceMap.getString("jLabel36.text")); // NOI18N
        jLabel36.setName("jLabel36"); // NOI18N

        jLabelRSRM.setText(resourceMap.getString("jLabelRSRM.text")); // NOI18N
        jLabelRSRM.setName("jLabelRSRM"); // NOI18N

        jSeparator2.setName("jSeparator2"); // NOI18N

        jLabel6.setFont(resourceMap.getFont("jLabel6.font")); // NOI18N
        jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N
        jLabel6.setName("jLabel6"); // NOI18N

        jLabel7.setText(resourceMap.getString("jLabel7.text")); // NOI18N
        jLabel7.setName("jLabel7"); // NOI18N

        jComboBoxMalt1.setName("jComboBoxMalt1"); // NOI18N

        jTextFieldMPct1.setText(resourceMap.getString("jTextFieldMPct1.text")); // NOI18N
        jTextFieldMPct1.setName("jTextFieldMPct1"); // NOI18N

        jLabel8.setText(resourceMap.getString("jLabel8.text")); // NOI18N
        jLabel8.setName("jLabel8"); // NOI18N

        jComboBoxMalt2.setName("jComboBoxMalt2"); // NOI18N

        jTextFieldMPct2.setName("jTextFieldMPct2"); // NOI18N

        jComboBoxMalt3.setName("jComboBoxMalt3"); // NOI18N

        jTextFieldMPct3.setName("jTextFieldMPct3"); // NOI18N

        jComboBoxMalt4.setName("jComboBoxMalt4"); // NOI18N

        jComboBoxMalt5.setName("jComboBoxMalt5"); // NOI18N

        jComboBoxMalt6.setName("jComboBoxMalt6"); // NOI18N

        jComboBoxMalt7.setName("jComboBoxMalt7"); // NOI18N

        jComboBoxMalt8.setName("jComboBoxMalt8"); // NOI18N

        jTextFieldMPct4.setName("jTextFieldMPct4"); // NOI18N

        jTextFieldMPct5.setName("jTextFieldMPct5"); // NOI18N

        jTextFieldMPct6.setName("jTextFieldMPct6"); // NOI18N

        jTextFieldMPct7.setName("jTextFieldMPct7"); // NOI18N

        jTextFieldMPct8.setName("jTextFieldMPct8"); // NOI18N

        jComboBoxMalt9.setName("jComboBoxMalt9"); // NOI18N

        jTextFieldMPct9.setName("jTextFieldMPct9"); // NOI18N

        jComboBoxMalt10.setName("jComboBoxMalt10"); // NOI18N

        jTextFieldMPct10.setName("jTextFieldMPct10"); // NOI18N

        jSeparator3.setName("jSeparator3"); // NOI18N

        jLabel9.setFont(resourceMap.getFont("jLabel9.font")); // NOI18N
        jLabel9.setText(resourceMap.getString("jLabel9.text")); // NOI18N
        jLabel9.setName("jLabel9"); // NOI18N

        jLabel10.setText(resourceMap.getString("jLabel10.text")); // NOI18N
        jLabel10.setName("jLabel10"); // NOI18N

        jComboBoxHop1.setName("jComboBoxHop1"); // NOI18N

        jComboBoxHop2.setName("jComboBoxHop2"); // NOI18N

        jComboBoxHop3.setName("jComboBoxHop3"); // NOI18N

        jComboBoxHop4.setName("jComboBoxHop4"); // NOI18N

        jComboBoxHop5.setName("jComboBoxHop5"); // NOI18N

        jComboBoxHop6.setName("jComboBoxHop6"); // NOI18N

        jComboBoxHop7.setName("jComboBoxHop7"); // NOI18N

        jComboBoxHop8.setName("jComboBoxHop8"); // NOI18N

        jComboBoxHop9.setName("jComboBoxHop9"); // NOI18N

        jComboBoxHop10.setName("jComboBoxHop10"); // NOI18N

        jTextFieldHopTime10.setName("jTextFieldHopTime10"); // NOI18N

        jTextFieldHopLbs10.setName("jTextFieldHopLbs10"); // NOI18N

        jTextFieldHopLbs9.setName("jTextFieldHopLbs9"); // NOI18N

        jTextFieldHopTime9.setName("jTextFieldHopTime9"); // NOI18N

        jTextFieldHopTime8.setName("jTextFieldHopTime8"); // NOI18N

        jTextFieldHopLbs8.setName("jTextFieldHopLbs8"); // NOI18N

        jTextFieldHopLbs7.setName("jTextFieldHopLbs7"); // NOI18N

        jTextFieldHopTime7.setName("jTextFieldHopTime7"); // NOI18N

        jTextFieldHopTime6.setName("jTextFieldHopTime6"); // NOI18N

        jTextFieldHopLbs6.setName("jTextFieldHopLbs6"); // NOI18N

        jTextFieldHopLbs5.setName("jTextFieldHopLbs5"); // NOI18N

        jTextFieldHopTime5.setName("jTextFieldHopTime5"); // NOI18N

        jTextFieldHopTime4.setName("jTextFieldHopTime4"); // NOI18N

        jTextFieldHopLbs4.setName("jTextFieldHopLbs4"); // NOI18N

        jTextFieldHopLbs3.setName("jTextFieldHopLbs3"); // NOI18N

        jTextFieldHopTime3.setName("jTextFieldHopTime3"); // NOI18N

        jTextFieldHopTime2.setName("jTextFieldHopTime2"); // NOI18N

        jTextFieldHopLbs2.setName("jTextFieldHopLbs2"); // NOI18N

        jTextFieldHopLbs1.setName("jTextFieldHopLbs1"); // NOI18N

        jTextFieldHopTime1.setName("jTextFieldHopTime1"); // NOI18N

        jLabel11.setText(resourceMap.getString("jLabel11.text")); // NOI18N
        jLabel11.setName("jLabel11"); // NOI18N

        jLabel12.setText(resourceMap.getString("jLabel12.text")); // NOI18N
        jLabel12.setName("jLabel12"); // NOI18N

        jCheckBoxHop1FWH.setText(resourceMap.getString("jCheckBoxHop1FWH.text")); // NOI18N
        jCheckBoxHop1FWH.setName("jCheckBoxHop1FWH"); // NOI18N

        jCheckBoxHop2FWH.setText(resourceMap.getString("jCheckBoxHop2FWH.text")); // NOI18N
        jCheckBoxHop2FWH.setName("jCheckBoxHop2FWH"); // NOI18N

        jSeparator4.setName("jSeparator4"); // NOI18N

        jLabel13.setFont(resourceMap.getFont("jLabel13.font")); // NOI18N
        jLabel13.setText(resourceMap.getString("jLabel13.text")); // NOI18N
        jLabel13.setName("jLabel13"); // NOI18N

        jLabel16.setText(resourceMap.getString("jLabel16.text")); // NOI18N
        jLabel16.setName("jLabel16"); // NOI18N

        jTextFieldGyp.setText(resourceMap.getString("jTextFieldGyp.text")); // NOI18N
        jTextFieldGyp.setName("jTextFieldGyp"); // NOI18N

        jLabel17.setText(resourceMap.getString("jLabel17.text")); // NOI18N
        jLabel17.setName("jLabel17"); // NOI18N

        jTextFieldCaCl.setName("jTextFieldCaCl"); // NOI18N

        jLabel18.setText(resourceMap.getString("jLabel18.text")); // NOI18N
        jLabel18.setName("jLabel18"); // NOI18N

        jTextFieldEpsom.setName("jTextFieldEpsom"); // NOI18N

        jLabel19.setText(resourceMap.getString("jLabel19.text")); // NOI18N
        jLabel19.setName("jLabel19"); // NOI18N

        jTextFieldChalk.setName("jTextFieldChalk"); // NOI18N

        jLabel20.setText(resourceMap.getString("jLabel20.text")); // NOI18N
        jLabel20.setName("jLabel20"); // NOI18N

        jTextFieldNaCl.setName("jTextFieldNaCl"); // NOI18N

        jSeparator5.setName("jSeparator5"); // NOI18N

        jLabel21.setFont(resourceMap.getFont("jLabel21.font")); // NOI18N
        jLabel21.setText(resourceMap.getString("jLabel21.text")); // NOI18N
        jLabel21.setName("jLabel21"); // NOI18N

        jLabel22.setText(resourceMap.getString("jLabel22.text")); // NOI18N
        jLabel22.setName("jLabel22"); // NOI18N

        jTextFieldRatio.setName("jTextFieldRatio"); // NOI18N

        jLabel24.setText(resourceMap.getString("jLabel24.text")); // NOI18N
        jLabel24.setName("jLabel24"); // NOI18N

        jLabel23.setText(resourceMap.getString("jLabel23.text")); // NOI18N
        jLabel23.setName("jLabel23"); // NOI18N

        jTextFieldTargetTemp.setName("jTextFieldTargetTemp"); // NOI18N

        jLabel25.setText(resourceMap.getString("jLabel25.text")); // NOI18N
        jLabel25.setName("jLabel25"); // NOI18N

        jSeparator6.setName("jSeparator6"); // NOI18N

        jLabel26.setFont(resourceMap.getFont("jLabel26.font")); // NOI18N
        jLabel26.setText(resourceMap.getString("jLabel26.text")); // NOI18N
        jLabel26.setName("jLabel26"); // NOI18N

        jComboBoxYeast.setName("jComboBoxYeast"); // NOI18N

        jLabel28.setText(resourceMap.getString("jLabel28.text")); // NOI18N
        jLabel28.setName("jLabel28"); // NOI18N

        jTextFieldPTemp.setName("jTextFieldPTemp"); // NOI18N

        jLabel27.setText(resourceMap.getString("jLabel27.text")); // NOI18N
        jLabel27.setName("jLabel27"); // NOI18N

        jSeparator7.setName("jSeparator7"); // NOI18N

        jLabel29.setFont(resourceMap.getFont("jLabel29.font")); // NOI18N
        jLabel29.setText(resourceMap.getString("jLabel29.text")); // NOI18N
        jLabel29.setName("jLabel29"); // NOI18N

        jLabel30.setText(resourceMap.getString("jLabel30.text")); // NOI18N
        jLabel30.setName("jLabel30"); // NOI18N

        jComboBoxDHop1.setName("jComboBoxDHop1"); // NOI18N

        jComboBoxDHop2.setName("jComboBoxDHop2"); // NOI18N

        jComboBoxDHop3.setName("jComboBoxDHop3"); // NOI18N

        jComboBoxDHop4.setName("jComboBoxDHop4"); // NOI18N

        jTextFieldDHopDay4.setName("jTextFieldDHopDay4"); // NOI18N

        jTextFieldDHopDay3.setName("jTextFieldDHopDay3"); // NOI18N

        jTextFieldDHopDay2.setName("jTextFieldDHopDay2"); // NOI18N

        jTextFieldDHopDay1.setName("jTextFieldDHopDay1"); // NOI18N

        jLabel32.setText(resourceMap.getString("jLabel32.text")); // NOI18N
        jLabel32.setName("jLabel32"); // NOI18N

        jLabel31.setText(resourceMap.getString("jLabel31.text")); // NOI18N
        jLabel31.setName("jLabel31"); // NOI18N

        jTextFieldDHopLbs1.setName("jTextFieldDHopLbs1"); // NOI18N

        jTextFieldDHopLbs2.setName("jTextFieldDHopLbs2"); // NOI18N

        jTextFieldDHopLbs3.setName("jTextFieldDHopLbs3"); // NOI18N

        jTextFieldDHopLbs4.setName("jTextFieldDHopLbs4"); // NOI18N

        jSeparator8.setName("jSeparator8"); // NOI18N

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jSeparator1, javax.swing.GroupLayout.DEFAULT_SIZE, 532, Short.MAX_VALUE)
            .addComponent(jSeparator2, javax.swing.GroupLayout.DEFAULT_SIZE, 532, Short.MAX_VALUE)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jLabel6)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(10, 10, 10)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel1Layout.createSequentialGroup()
                                    .addGap(10, 10, 10)
                                    .addComponent(jComboBoxMalt1, javax.swing.GroupLayout.PREFERRED_SIZE, 336, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addComponent(jLabel7)
                                .addComponent(jComboBoxMalt2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 336, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(jComboBoxMalt3, javax.swing.GroupLayout.PREFERRED_SIZE, 336, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jComboBoxMalt8, javax.swing.GroupLayout.PREFERRED_SIZE, 336, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jComboBoxMalt5, javax.swing.GroupLayout.PREFERRED_SIZE, 336, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jComboBoxMalt4, javax.swing.GroupLayout.PREFERRED_SIZE, 336, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jComboBoxMalt6, javax.swing.GroupLayout.PREFERRED_SIZE, 336, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jComboBoxMalt7, javax.swing.GroupLayout.PREFERRED_SIZE, 336, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jComboBoxMalt9, javax.swing.GroupLayout.PREFERRED_SIZE, 336, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jComboBoxMalt10, javax.swing.GroupLayout.PREFERRED_SIZE, 336, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jTextFieldMPct10)
                            .addComponent(jTextFieldMPct9)
                            .addComponent(jTextFieldMPct8, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addComponent(jTextFieldMPct5, javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jTextFieldMPct4, javax.swing.GroupLayout.Alignment.LEADING))
                            .addComponent(jTextFieldMPct6, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jTextFieldMPct7, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jTextFieldMPct3, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jTextFieldMPct2, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel8)
                            .addComponent(jTextFieldMPct1, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(84, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jLabel1)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTextFieldRName, javax.swing.GroupLayout.DEFAULT_SIZE, 345, Short.MAX_VALUE))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                                .addComponent(jLabel2)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTextFieldTG, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(jLabel3)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTextFieldVol, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel4)))
                        .addGap(18, 18, 18)
                        .addComponent(jLabel5)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextFieldRRev, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
                        .addGap(10, 10, 10)
                        .addComponent(jLabel34)
                        .addGap(6, 6, 6)
                        .addComponent(jLabelRecipeID)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel35)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabelRIBU)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel36)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabelRSRM))
                    .addComponent(jLabel33, javax.swing.GroupLayout.Alignment.LEADING))
                .addContainerGap())
            .addComponent(jSeparator3, javax.swing.GroupLayout.DEFAULT_SIZE, 532, Short.MAX_VALUE)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel9)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(10, 10, 10)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jComboBoxHop1, javax.swing.GroupLayout.PREFERRED_SIZE, 270, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jComboBoxHop2, javax.swing.GroupLayout.PREFERRED_SIZE, 281, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jComboBoxHop3, javax.swing.GroupLayout.PREFERRED_SIZE, 281, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jComboBoxHop4, javax.swing.GroupLayout.PREFERRED_SIZE, 281, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jComboBoxHop5, javax.swing.GroupLayout.PREFERRED_SIZE, 281, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jComboBoxHop6, javax.swing.GroupLayout.PREFERRED_SIZE, 281, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jComboBoxHop7, javax.swing.GroupLayout.PREFERRED_SIZE, 281, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jComboBoxHop8, javax.swing.GroupLayout.PREFERRED_SIZE, 281, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jComboBoxHop9, javax.swing.GroupLayout.PREFERRED_SIZE, 281, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jComboBoxHop10, javax.swing.GroupLayout.PREFERRED_SIZE, 281, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel10))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel11)
                            .addComponent(jTextFieldHopTime2, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jTextFieldHopTime1, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jTextFieldHopTime3, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jTextFieldHopTime4, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jTextFieldHopTime5, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jTextFieldHopTime6, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jTextFieldHopTime7, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jTextFieldHopTime8, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jTextFieldHopTime9, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jTextFieldHopTime10, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel1Layout.createSequentialGroup()
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addGroup(jPanel1Layout.createSequentialGroup()
                                            .addComponent(jTextFieldHopLbs1, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                            .addComponent(jCheckBoxHop1FWH))
                                        .addComponent(jLabel12)))
                                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(jTextFieldHopLbs2, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(jCheckBoxHop2FWH)))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jTextFieldHopLbs10, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(55, 55, 55))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jTextFieldHopLbs9, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(55, 55, 55))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jTextFieldHopLbs8, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(55, 55, 55))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jTextFieldHopLbs7, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(55, 55, 55))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jTextFieldHopLbs6, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(55, 55, 55))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jTextFieldHopLbs5, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(55, 55, 55))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jTextFieldHopLbs4, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(55, 55, 55))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jTextFieldHopLbs3, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(55, 55, 55)))))
                .addContainerGap(28, Short.MAX_VALUE))
            .addComponent(jSeparator4, javax.swing.GroupLayout.DEFAULT_SIZE, 532, Short.MAX_VALUE)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel13)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(10, 10, 10)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel17)
                            .addComponent(jLabel16))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jTextFieldCaCl, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jLabel19))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jTextFieldGyp, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(jLabel18)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jTextFieldChalk, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jTextFieldEpsom, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(jLabel20)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTextFieldNaCl, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                .addContainerGap(195, Short.MAX_VALUE))
            .addComponent(jSeparator5, javax.swing.GroupLayout.DEFAULT_SIZE, 532, Short.MAX_VALUE)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(10, 10, 10)
                        .addComponent(jLabel22)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextFieldRatio, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel24))
                    .addComponent(jLabel21))
                .addGap(18, 18, 18)
                .addComponent(jLabel23)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTextFieldTargetTemp, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel25)
                .addContainerGap(136, Short.MAX_VALUE))
            .addComponent(jSeparator6, javax.swing.GroupLayout.DEFAULT_SIZE, 532, Short.MAX_VALUE)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(10, 10, 10)
                        .addComponent(jComboBoxYeast, javax.swing.GroupLayout.PREFERRED_SIZE, 271, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jLabel26))
                .addGap(18, 18, 18)
                .addComponent(jLabel27)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTextFieldPTemp, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel28)
                .addGap(87, 87, 87))
            .addComponent(jSeparator7, javax.swing.GroupLayout.DEFAULT_SIZE, 532, Short.MAX_VALUE)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(10, 10, 10)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jComboBoxDHop2, javax.swing.GroupLayout.PREFERRED_SIZE, 326, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(jTextFieldDHopDay2, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(jTextFieldDHopLbs2, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jComboBoxDHop3, javax.swing.GroupLayout.PREFERRED_SIZE, 326, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(jTextFieldDHopDay3, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(jTextFieldDHopLbs3, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jComboBoxDHop4, javax.swing.GroupLayout.PREFERRED_SIZE, 326, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(jTextFieldDHopDay4, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(jTextFieldDHopLbs4, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jComboBoxDHop1, javax.swing.GroupLayout.PREFERRED_SIZE, 314, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel30))
                                .addGap(18, 18, 18)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel32)
                                    .addComponent(jTextFieldDHopDay1, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(18, 18, 18)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel31)
                                    .addComponent(jTextFieldDHopLbs1, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                    .addComponent(jLabel29))
                .addContainerGap(22, Short.MAX_VALUE))
            .addComponent(jSeparator8, javax.swing.GroupLayout.DEFAULT_SIZE, 532, Short.MAX_VALUE)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jButtonSubmitRecipe)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 324, Short.MAX_VALUE)
                .addComponent(jButtonPrint)
                .addContainerGap())
        );

        jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jComboBoxHop1, jComboBoxHop10, jComboBoxHop2, jComboBoxHop3, jComboBoxHop4, jComboBoxHop5, jComboBoxHop6, jComboBoxHop7, jComboBoxHop8, jComboBoxHop9});

        jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jTextFieldHopLbs1, jTextFieldHopLbs10, jTextFieldHopLbs2, jTextFieldHopLbs3, jTextFieldHopLbs4, jTextFieldHopLbs5, jTextFieldHopLbs6, jTextFieldHopLbs7, jTextFieldHopLbs8, jTextFieldHopLbs9, jTextFieldHopTime1, jTextFieldHopTime10, jTextFieldHopTime2, jTextFieldHopTime3, jTextFieldHopTime4, jTextFieldHopTime5, jTextFieldHopTime6, jTextFieldHopTime7, jTextFieldHopTime8, jTextFieldHopTime9});

        jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jTextFieldMPct1, jTextFieldMPct10, jTextFieldMPct2, jTextFieldMPct3, jTextFieldMPct4, jTextFieldMPct5, jTextFieldMPct6, jTextFieldMPct7, jTextFieldMPct8, jTextFieldMPct9});

        jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jComboBoxDHop1, jComboBoxDHop2, jComboBoxDHop3, jComboBoxDHop4});

        jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jTextFieldDHopDay1, jTextFieldDHopDay2, jTextFieldDHopDay3, jTextFieldDHopDay4, jTextFieldDHopLbs1, jTextFieldDHopLbs2, jTextFieldDHopLbs3, jTextFieldDHopLbs4});

        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(jTextFieldRName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldRRev, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel5))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(jTextFieldVol, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel4)
                    .addComponent(jTextFieldTG, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel33)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel34)
                    .addComponent(jLabelRecipeID)
                    .addComponent(jLabel35)
                    .addComponent(jLabelRIBU)
                    .addComponent(jLabel36)
                    .addComponent(jLabelRSRM))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel6)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel7)
                    .addComponent(jLabel8))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jComboBoxMalt1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldMPct1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(2, 2, 2)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jComboBoxMalt2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldMPct2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(2, 2, 2)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jComboBoxMalt3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldMPct3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(2, 2, 2)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jComboBoxMalt4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(2, 2, 2)
                        .addComponent(jComboBoxMalt5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(2, 2, 2)
                        .addComponent(jComboBoxMalt6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(2, 2, 2)
                        .addComponent(jComboBoxMalt7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(2, 2, 2)
                        .addComponent(jComboBoxMalt8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jTextFieldMPct4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(2, 2, 2)
                        .addComponent(jTextFieldMPct5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(2, 2, 2)
                        .addComponent(jTextFieldMPct6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(2, 2, 2)
                        .addComponent(jTextFieldMPct7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(2, 2, 2)
                        .addComponent(jTextFieldMPct8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(2, 2, 2)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jComboBoxMalt9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldMPct9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(2, 2, 2)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jComboBoxMalt10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldMPct10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel9)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel12)
                    .addComponent(jLabel10)
                    .addComponent(jLabel11))
                .addGap(0, 0, 0)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jTextFieldHopLbs1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldHopTime1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jComboBoxHop1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jCheckBoxHop1FWH))
                .addGap(0, 0, 0)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jTextFieldHopTime2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldHopLbs2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jComboBoxHop2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jCheckBoxHop2FWH))
                .addGap(0, 0, 0)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jComboBoxHop3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldHopLbs3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldHopTime3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(2, 2, 2)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jComboBoxHop4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldHopLbs4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldHopTime4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(2, 2, 2)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jComboBoxHop5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldHopLbs5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldHopTime5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(2, 2, 2)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jComboBoxHop6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldHopLbs6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldHopTime6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(2, 2, 2)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jComboBoxHop7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldHopLbs7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldHopTime7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(2, 2, 2)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jComboBoxHop8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldHopLbs8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldHopTime8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(2, 2, 2)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jComboBoxHop9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldHopLbs9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldHopTime9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(2, 2, 2)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jComboBoxHop10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldHopLbs10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldHopTime10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel13)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel16)
                    .addComponent(jTextFieldGyp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel18)
                    .addComponent(jTextFieldEpsom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel20)
                    .addComponent(jTextFieldNaCl, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel17)
                    .addComponent(jTextFieldCaCl, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel19)
                    .addComponent(jTextFieldChalk, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel21)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel22)
                    .addComponent(jTextFieldRatio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel24)
                    .addComponent(jLabel23)
                    .addComponent(jTextFieldTargetTemp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel25))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel26)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jComboBoxYeast, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel27)
                    .addComponent(jTextFieldPTemp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel28))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel29)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel32)
                    .addComponent(jLabel31)
                    .addComponent(jLabel30))
                .addGap(2, 2, 2)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jComboBoxDHop1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldDHopDay1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldDHopLbs1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(2, 2, 2)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jComboBoxDHop2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldDHopDay2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldDHopLbs2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(2, 2, 2)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jComboBoxDHop3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldDHopDay3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldDHopLbs3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(2, 2, 2)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jComboBoxDHop4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldDHopDay4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldDHopLbs4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButtonSubmitRecipe)
                    .addComponent(jButtonPrint))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jScrollPane1.setViewportView(jPanel1);

        jButtonExit.setAction(actionMap.get("ExitRecipe")); // NOI18N
        jButtonExit.setText(resourceMap.getString("jButtonExit.text")); // NOI18N
        jButtonExit.setName("jButtonExit"); // NOI18N

        jButtonUpdateRecipe.setAction(actionMap.get("UpdateRecipe")); // NOI18N
        jButtonUpdateRecipe.setText(resourceMap.getString("jButtonUpdateRecipe.text")); // NOI18N
        jButtonUpdateRecipe.setName("jButtonUpdateRecipe"); // NOI18N

        jButtonNewRecipe.setAction(actionMap.get("NewRecipe")); // NOI18N
        jButtonNewRecipe.setText(resourceMap.getString("jButtonNewRecipe.text")); // NOI18N
        jButtonNewRecipe.setName("jButtonNewRecipe"); // NOI18N

        jButtonNewRev.setAction(actionMap.get("NewRev")); // NOI18N
        jButtonNewRev.setText(resourceMap.getString("jButtonNewRev.text")); // NOI18N
        jButtonNewRev.setName("jButtonNewRev"); // NOI18N

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jComboBoxRecipe, 0, 339, Short.MAX_VALUE)
                .addGap(18, 18, 18)
                .addComponent(jButtonCustFirst)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButtonCustPrev)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButtonCustNext)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButtonCustLast)
                .addContainerGap())
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jButtonUpdateRecipe)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButtonNewRecipe)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButtonNewRev)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 131, Short.MAX_VALUE)
                .addComponent(jButtonExit)
                .addContainerGap())
            .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 575, Short.MAX_VALUE)
        );

        layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jButtonCustNext, jButtonCustPrev});

        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(jComboBoxRecipe, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButtonCustFirst)
                    .addComponent(jButtonCustNext)
                    .addComponent(jButtonCustLast)
                    .addComponent(jButtonCustPrev, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 379, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButtonExit)
                    .addComponent(jButtonUpdateRecipe)
                    .addComponent(jButtonNewRecipe)
                    .addComponent(jButtonNewRev))
                .addContainerGap())
        );

        layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {jButtonCustNext, jButtonCustPrev});

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jComboBoxRecipeItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jComboBoxRecipeItemStateChanged
        // TODO add your handling code here:
        /*String Itm = jComboBoxRecipe.getSelectedItem().toString();

        DBA.openDBCon();

        for(String s[] : Recipes){
            String BrewComp = s[0] + ": " + s[1] + " - Rev " + s[2];

            if (BrewComp.equals(Itm)) {
                DBA.GetRecipesData(s[0]);
            }
        }

        DBA.closeDBCon();

        SetData();*/
    }//GEN-LAST:event_jComboBoxRecipeItemStateChanged

    private void jComboBoxRecipeMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jComboBoxRecipeMouseClicked

    }//GEN-LAST:event_jComboBoxRecipeMouseClicked

    private void jComboBoxRecipePopupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {//GEN-FIRST:event_jComboBoxRecipePopupMenuWillBecomeInvisible
        // TODO add your handling code here:
        String Itm = jComboBoxRecipe.getSelectedItem().toString();

        DBA.openDBCon();

        for(String s[] : Recipes){
            String BrewComp = s[0] + ": " + s[1] + " - Rev " + s[2];

            if (BrewComp.equals(Itm)) {
                DBA.GetRecipesData(s[0]);
            }
        }

        DBA.closeDBCon();

        SetData();
    }//GEN-LAST:event_jComboBoxRecipePopupMenuWillBecomeInvisible

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new RecipeFrame().setVisible(true);
            }
        });
    }

    public void SetData(){

        //Reset all data to begin.
        jComboBoxMalt1.setSelectedIndex(0);
        jComboBoxMalt2.setSelectedIndex(0);
        jComboBoxMalt3.setSelectedIndex(0);
        jComboBoxMalt4.setSelectedIndex(0);
        jComboBoxMalt5.setSelectedIndex(0);
        jComboBoxMalt6.setSelectedIndex(0);
        jComboBoxMalt7.setSelectedIndex(0);
        jComboBoxMalt8.setSelectedIndex(0);
        jComboBoxMalt9.setSelectedIndex(0);
        jComboBoxMalt10.setSelectedIndex(0);
        jComboBoxHop1.setSelectedIndex(0);
        jComboBoxHop2.setSelectedIndex(0);
        jComboBoxHop3.setSelectedIndex(0);
        jComboBoxHop4.setSelectedIndex(0);
        jComboBoxHop5.setSelectedIndex(0);
        jComboBoxHop6.setSelectedIndex(0);
        jComboBoxHop7.setSelectedIndex(0);
        jComboBoxHop8.setSelectedIndex(0);
        jComboBoxHop9.setSelectedIndex(0);
        jComboBoxHop10.setSelectedIndex(0);
        jComboBoxDHop1.setSelectedIndex(0);
        jComboBoxDHop2.setSelectedIndex(0);
        jComboBoxDHop3.setSelectedIndex(0);
        jComboBoxDHop4.setSelectedIndex(0);
        jCheckBoxHop1FWH.setSelected(false);
        jCheckBoxHop2FWH.setSelected(false);
        jTextFieldMPct1.setText("");
        jTextFieldMPct2.setText("");
        jTextFieldMPct3.setText("");
        jTextFieldMPct4.setText("");
        jTextFieldMPct5.setText("");
        jTextFieldMPct6.setText("");
        jTextFieldMPct7.setText("");
        jTextFieldMPct8.setText("");
        jTextFieldMPct9.setText("");
        jTextFieldMPct10.setText("");
        jTextFieldHopTime1.setText("");
        jTextFieldHopLbs1.setText("");
        jTextFieldHopTime2.setText("");
        jTextFieldHopLbs2.setText("");
        jTextFieldHopTime3.setText("");
        jTextFieldHopLbs3.setText("");
        jTextFieldHopTime4.setText("");
        jTextFieldHopLbs4.setText("");
        jTextFieldHopTime5.setText("");
        jTextFieldHopLbs5.setText("");
        jTextFieldHopTime6.setText("");
        jTextFieldHopLbs6.setText("");
        jTextFieldHopTime7.setText("");
        jTextFieldHopLbs7.setText("");
        jTextFieldHopTime8.setText("");
        jTextFieldHopLbs8.setText("");
        jTextFieldHopTime9.setText("");
        jTextFieldHopLbs9.setText("");
        jTextFieldHopTime10.setText("");
        jTextFieldHopLbs10.setText("");
        jTextFieldDHopDay1.setText("");
        jTextFieldDHopLbs1.setText("");
        jTextFieldDHopDay2.setText("");
        jTextFieldDHopLbs2.setText("");
        jTextFieldDHopDay3.setText("");
        jTextFieldDHopLbs3.setText("");
        jTextFieldDHopDay4.setText("");
        jTextFieldDHopLbs4.setText("");
        jLabelRecipeID.setText("0");
        jLabelRSRM.setText("0");
        jLabelRIBU.setText("0");



        //Open Database Connection
        DBA.openDBCon();

        

        //Load Recipe Name
        jTextFieldRName.setText(DBA.RName);
        jTextFieldRRev.setText(Integer.toString(DBA.RRev));
        jTextFieldTG.setText(f3.format(DBA.RGT));
        jTextFieldVol.setText(f.format(DBA.RVol));

        jLabelRecipeID.setText(Integer.toString(DBA.RecpID));
        jLabelRIBU.setText(f.format(DBA.RIBU));

        //Load Malt Data
        for(String s[] : Malt){
            if(s[0].equals(Integer.toString(DBA.MName01))){
                jComboBoxMalt1.setSelectedItem(s[1]);
                jTextFieldMPct1.setText(Float.toString(DBA.Mpct01));
            }
            if(s[0].equals(Integer.toString(DBA.MName02))){
                jComboBoxMalt2.setSelectedItem(s[1]);
                jTextFieldMPct2.setText(Float.toString(DBA.Mpct02));
            }
            if(s[0].equals(Integer.toString(DBA.MName03))){
                jComboBoxMalt3.setSelectedItem(s[1]);
                jTextFieldMPct3.setText(Float.toString(DBA.Mpct03));
            }
            if(s[0].equals(Integer.toString(DBA.MName04))){
                jComboBoxMalt4.setSelectedItem(s[1]);
                jTextFieldMPct4.setText(Float.toString(DBA.Mpct04));
            }
            if(s[0].equals(Integer.toString(DBA.MName05))){
                jComboBoxMalt5.setSelectedItem(s[1]);
                jTextFieldMPct5.setText(Float.toString(DBA.Mpct05));
            }
            if(s[0].equals(Integer.toString(DBA.MName06))){
                jComboBoxMalt6.setSelectedItem(s[1]);
                jTextFieldMPct6.setText(Float.toString(DBA.Mpct06));
            }
            if(s[0].equals(Integer.toString(DBA.MName07))){
                jComboBoxMalt7.setSelectedItem(s[1]);
                jTextFieldMPct7.setText(Float.toString(DBA.Mpct07));
            }
            if(s[0].equals(Integer.toString(DBA.MName08))){
                jComboBoxMalt8.setSelectedItem(s[1]);
                jTextFieldMPct8.setText(Float.toString(DBA.Mpct08));
            }
            if(s[0].equals(Integer.toString(DBA.MName09))){
                jComboBoxMalt9.setSelectedItem(s[1]);
                jTextFieldMPct9.setText(Float.toString(DBA.Mpct09));
            }
            if(s[0].equals(Integer.toString(DBA.MName10))){
                jComboBoxMalt10.setSelectedItem(s[1]);
                jTextFieldMPct10.setText(Float.toString(DBA.Mpct10));
            }
        }

        //Fill in Hop data.
        for(String s[] : Hops){
            if(s[0].equals(Integer.toString(DBA.HName01))){
                jComboBoxHop1.setSelectedItem(s[1]);
                jTextFieldHopTime1.setText(Float.toString(DBA.AApct01));
                jTextFieldHopLbs1.setText(Float.toString(DBA.hlbs01));
                jCheckBoxHop1FWH.setSelected(DBA.fwh1);
            }
            if(s[0].equals(Integer.toString(DBA.HName02))){
                jComboBoxHop2.setSelectedItem(s[1]);
                jTextFieldHopTime2.setText(Float.toString(DBA.AApct02));
                jTextFieldHopLbs2.setText(Float.toString(DBA.hlbs02));
                jCheckBoxHop2FWH.setSelected(DBA.fwh2);
            }
            if(s[0].equals(Integer.toString(DBA.HName03))){
                jComboBoxHop3.setSelectedItem(s[1]);
                jTextFieldHopTime3.setText(Float.toString(DBA.AApct03));
                jTextFieldHopLbs3.setText(Float.toString(DBA.hlbs03));
            }
            if(s[0].equals(Integer.toString(DBA.HName04))){
                jComboBoxHop4.setSelectedItem(s[1]);
                jTextFieldHopTime4.setText(Float.toString(DBA.AApct04));
                jTextFieldHopLbs4.setText(Float.toString(DBA.hlbs04));
            }
            if(s[0].equals(Integer.toString(DBA.HName05))){
                jComboBoxHop5.setSelectedItem(s[1]);
                jTextFieldHopTime5.setText(Float.toString(DBA.AApct05));
                jTextFieldHopLbs5.setText(Float.toString(DBA.hlbs05));
            }
            if(s[0].equals(Integer.toString(DBA.HName06))){
                jComboBoxHop6.setSelectedItem(s[1]);
                jTextFieldHopTime6.setText(Float.toString(DBA.AApct06));
                jTextFieldHopLbs6.setText(Float.toString(DBA.hlbs06));
            }
            if(s[0].equals(Integer.toString(DBA.HName07))){
                jComboBoxHop7.setSelectedItem(s[1]);
                jTextFieldHopTime7.setText(Float.toString(DBA.AApct07));
                jTextFieldHopLbs7.setText(Float.toString(DBA.hlbs07));
            }
            if(s[0].equals(Integer.toString(DBA.HName08))){
                jComboBoxHop8.setSelectedItem(s[1]);
                jTextFieldHopTime8.setText(Float.toString(DBA.AApct08));
                jTextFieldHopLbs8.setText(Float.toString(DBA.hlbs08));
            }
            if(s[0].equals(Integer.toString(DBA.HName09))){
                jComboBoxHop9.setSelectedItem(s[1]);
                jTextFieldHopTime9.setText(Float.toString(DBA.AApct09));
                jTextFieldHopLbs9.setText(Float.toString(DBA.hlbs09));
            }
            if(s[0].equals(Integer.toString(DBA.HName10))){
                jComboBoxHop10.setSelectedItem(s[1]);
                jTextFieldHopTime10.setText(Float.toString(DBA.AApct10));
                jTextFieldHopLbs10.setText(Float.toString(DBA.hlbs10));
            }
            if(s[0].equals(Integer.toString(DBA.DHHop1))){
                jComboBoxDHop1.setSelectedItem(s[1]);
                jTextFieldDHopDay1.setText(Integer.toString(DBA.DHDay1));
                jTextFieldDHopLbs1.setText(Float.toString(DBA.DHLbs1));
            }
            if(s[0].equals(Integer.toString(DBA.DHHop2))){
                jComboBoxDHop2.setSelectedItem(s[1]);
                jTextFieldDHopDay2.setText(Integer.toString(DBA.DHDay2));
                jTextFieldDHopLbs2.setText(Float.toString(DBA.DHLbs2));
            }
            if(s[0].equals(Integer.toString(DBA.DHHop3))){
                jComboBoxDHop3.setSelectedItem(s[1]);
                jTextFieldDHopDay3.setText(Integer.toString(DBA.DHDay3));
                jTextFieldDHopLbs3.setText(Float.toString(DBA.DHLbs3));
            }
            if(s[0].equals(Integer.toString(DBA.DHHop4))){
                jComboBoxDHop4.setSelectedItem(s[1]);
                jTextFieldDHopDay4.setText(Integer.toString(DBA.DHDay4));
                jTextFieldDHopLbs4.setText(Float.toString(DBA.DHLbs4));
            }
        }

        //Load Water Data
        jTextFieldGyp.setText(Float.toString(DBA.gGypsum));
        jTextFieldCaCl.setText(Float.toString(DBA.gCaCl));
        jTextFieldEpsom.setText(Float.toString(DBA.gEpsomSalt));
        jTextFieldChalk.setText(Float.toString(DBA.gChalk));
        jTextFieldNaCl.setText(Float.toString(DBA.gTableSalt));

        //Load Mash Data.
        jTextFieldRatio.setText(Float.toString(DBA.ratio));
        jTextFieldTargetTemp.setText(Float.toString(DBA.ttemp));

        //Load Yeast Data.
        for(String s[] : Yeast){
            if(s[0].equals(Integer.toString(DBA.YeastName)))jComboBoxYeast.setSelectedItem(s[1]);
        }
        jTextFieldPTemp.setText(Float.toString(DBA.PTemp));

        DBA.closeDBCon();
    }

    public void LoadList(){

        //Clear all data in combo boxes.
        jComboBoxDHop1.removeAllItems();
        jComboBoxDHop2.removeAllItems();
        jComboBoxDHop3.removeAllItems();
        jComboBoxDHop4.removeAllItems();
        jComboBoxHop1.removeAllItems();
        jComboBoxHop2.removeAllItems();
        jComboBoxHop3.removeAllItems();
        jComboBoxHop4.removeAllItems();
        jComboBoxHop5.removeAllItems();
        jComboBoxHop6.removeAllItems();
        jComboBoxHop7.removeAllItems();
        jComboBoxHop8.removeAllItems();
        jComboBoxHop9.removeAllItems();
        jComboBoxHop10.removeAllItems();
        jComboBoxMalt1.removeAllItems();
        jComboBoxMalt2.removeAllItems();
        jComboBoxMalt3.removeAllItems();
        jComboBoxMalt4.removeAllItems();
        jComboBoxMalt5.removeAllItems();
        jComboBoxMalt6.removeAllItems();
        jComboBoxMalt7.removeAllItems();
        jComboBoxMalt8.removeAllItems();
        jComboBoxMalt9.removeAllItems();
        jComboBoxMalt10.removeAllItems();
        jComboBoxRecipe.removeAllItems();
        jComboBoxYeast.removeAllItems();

        //Load all combo boxes.

        //Add blanks in jComboBoxes.
        jComboBoxHop1.addItem("");
        jComboBoxHop2.addItem("");
        jComboBoxHop3.addItem("");
        jComboBoxHop4.addItem("");
        jComboBoxHop5.addItem("");
        jComboBoxHop6.addItem("");
        jComboBoxHop7.addItem("");
        jComboBoxHop8.addItem("");
        jComboBoxHop9.addItem("");
        jComboBoxHop10.addItem("");
        jComboBoxMalt1.addItem("");
        jComboBoxMalt2.addItem("");
        jComboBoxMalt3.addItem("");
        jComboBoxMalt4.addItem("");
        jComboBoxMalt5.addItem("");
        jComboBoxMalt6.addItem("");
        jComboBoxMalt7.addItem("");
        jComboBoxMalt8.addItem("");
        jComboBoxMalt9.addItem("");
        jComboBoxMalt10.addItem("");
        jComboBoxDHop1.addItem("");
        jComboBoxDHop2.addItem("");
        jComboBoxDHop3.addItem("");
        jComboBoxDHop4.addItem("");


        jComboBoxRecipe.addItem("");

        //Open Database Connection and run querys.
        DBA.openDBCon();
        Recipes = DBA.RunSQLQuery("SELECT RID,RName,RRev FROM Recipes");
        Hops = DBA.RunSQLQuery("SELECT HID,HopName FROM Hops");
        Yeast = DBA.RunSQLQuery("SELECT YID,YeastName FROM Yeast");
        Malt = DBA.RunSQLQuery("SELECT MaltID,MaltName FROM Malt");

        for(String s[] : Recipes){
            jComboBoxRecipe.addItem(s[0] + ": " + s[1] + " - Rev " + s[2]);
        }

        for(String s[] : Malt){
            jComboBoxMalt1.addItem(s[1]);
            jComboBoxMalt2.addItem(s[1]);
            jComboBoxMalt3.addItem(s[1]);
            jComboBoxMalt4.addItem(s[1]);
            jComboBoxMalt5.addItem(s[1]);
            jComboBoxMalt6.addItem(s[1]);
            jComboBoxMalt7.addItem(s[1]);
            jComboBoxMalt8.addItem(s[1]);
            jComboBoxMalt9.addItem(s[1]);
            jComboBoxMalt10.addItem(s[1]);
        }

        for(String s[] : Hops){
            jComboBoxHop1.addItem(s[1]);
            jComboBoxHop2.addItem(s[1]);
            jComboBoxHop3.addItem(s[1]);
            jComboBoxHop4.addItem(s[1]);
            jComboBoxHop5.addItem(s[1]);
            jComboBoxHop6.addItem(s[1]);
            jComboBoxHop7.addItem(s[1]);
            jComboBoxHop8.addItem(s[1]);
            jComboBoxHop9.addItem(s[1]);
            jComboBoxHop10.addItem(s[1]);
            jComboBoxDHop1.addItem(s[1]);
            jComboBoxDHop2.addItem(s[1]);
            jComboBoxDHop3.addItem(s[1]);
            jComboBoxDHop4.addItem(s[1]);
        }

        for(String s[] : Yeast){
            jComboBoxYeast.addItem(s[1]);
        }

        jScrollPane1.getVerticalScrollBar().setUnitIncrement(8);

        //Close Database Connection.
        DBA.closeDBCon();

        jButtonSubmitRecipe.setVisible(false);

        LastRecord();
    }

    @Action
    public void LastRecord() {
        jComboBoxRecipe.setSelectedIndex(jComboBoxRecipe.getItemCount()-1);
        String Itm = jComboBoxRecipe.getSelectedItem().toString();

        DBA.openDBCon();

        for(String s[] : Recipes){
            String BrewComp = s[0] + ": " + s[1] + " - Rev " + s[2];

            if (BrewComp.equals(Itm)) {
                DBA.GetRecipesData(s[0]);
            }
        }

        DBA.closeDBCon();

        SetData();
    }

    @Action
    public void FirstRecord() {
        jComboBoxRecipe.setSelectedIndex(0);
        String Itm = jComboBoxRecipe.getSelectedItem().toString();

        DBA.openDBCon();

        for(String s[] : Recipes){
            String BrewComp = s[0] + ": " + s[1] + " - Rev " + s[2];

            if (BrewComp.equals(Itm)) {
                DBA.GetRecipesData(s[0]);
            }
        }

        DBA.closeDBCon();

        SetData();
    }

    @Action
    public void NextRecord() {

        if(jComboBoxRecipe.getSelectedIndex() <= (jComboBoxRecipe.getItemCount() - 2)){
            jComboBoxRecipe.setSelectedIndex(jComboBoxRecipe.getSelectedIndex()+1);
        }
        String Itm = jComboBoxRecipe.getSelectedItem().toString();

        DBA.openDBCon();

        for(String s[] : Recipes){
            String BrewComp = s[0] + ": " + s[1] + " - Rev " + s[2];

            if (BrewComp.equals(Itm)) {
                DBA.GetRecipesData(s[0]);
            }
        }

        DBA.closeDBCon();

        SetData();
    }

    @Action
    public void PrevRecord() {
        if(jComboBoxRecipe.getSelectedIndex() >= 1){
            jComboBoxRecipe.setSelectedIndex(jComboBoxRecipe.getSelectedIndex()-1);
        }
        String Itm = jComboBoxRecipe.getSelectedItem().toString();

        DBA.openDBCon();

        for(String s[] : Recipes){
            String BrewComp = s[0] + ": " + s[1] + " - Rev " + s[2];

            if (BrewComp.equals(Itm)) {
                DBA.GetRecipesData(s[0]);
            }
        }

        DBA.closeDBCon();

        SetData();
    }

    @Action
    public void ExitRecipe() {
        dispose();
    }

    @Action
    public void UpdateRecipe() {
        //Check fields in database and update appropriately.
        int response = JOptionPane.showConfirmDialog(null,
                "This will modify current recipe, Continue? " +
                "\n(If this is a new recipe, please select the new recipe button.)" +
                "\n(If this is a new revision, please select the new revision button.)",
                "Warning",JOptionPane.WARNING_MESSAGE);
        
        if (response == 0){
            //Get Calculated IBUs.
            float RecipeIBU = CalcIBU();

            DBA.openDBCon();
            String RecipeID = jLabelRecipeID.getText();

            //Start query statemetn.
            String query = "UPDATE Recipes SET ";

            //Always fill in Recipe Name to ensure no comma problems.
            query += ("RName='" + jTextFieldRName.getText() + "'");

            for(String s[] : Malt){
                if((s[1]).equals(jComboBoxMalt1.getSelectedItem().toString())){
                    if(!s[0].equals(Integer.toString(DBA.MName01))){
                        query += (", MName01='" + s[0] + "'");
                    }
                }
                if((s[1]).equals(jComboBoxMalt2.getSelectedItem().toString())){
                    if(!s[0].equals(Integer.toString(DBA.MName02))){
                        query += (", MName02='" + s[0] + "'");
                    }
                }
                if((s[1]).equals(jComboBoxMalt3.getSelectedItem().toString())){
                    if(!s[0].equals(Integer.toString(DBA.MName03))){
                        query += (", MName03='" + s[0] + "'");
                    }
                }
                if((s[1]).equals(jComboBoxMalt4.getSelectedItem().toString())){
                    if(!s[0].equals(Integer.toString(DBA.MName04))){
                        query += (", MName04='" + s[0] + "'");
                    }
                }
                if((s[1]).equals(jComboBoxMalt5.getSelectedItem().toString())){
                    if(!s[0].equals(Integer.toString(DBA.MName05))){
                        query += (", MName05='" + s[0] + "'");
                    }
                }
                if((s[1]).equals(jComboBoxMalt6.getSelectedItem().toString())){
                    if(!s[0].equals(Integer.toString(DBA.MName06))){
                        query += (", MName06='" + s[0] + "'");
                    }
                }
                if((s[1]).equals(jComboBoxMalt7.getSelectedItem().toString())){
                    if(!s[0].equals(Integer.toString(DBA.MName07))){
                        query += (", MName07='" + s[0] + "'");
                    }
                }
                if((s[1]).equals(jComboBoxMalt8.getSelectedItem().toString())){
                    if(!s[0].equals(Integer.toString(DBA.MName08))){
                        query += (", MName08='" + s[0] + "'");
                    }
                }
                if((s[1]).equals(jComboBoxMalt9.getSelectedItem().toString())){
                    if(!s[0].equals(Integer.toString(DBA.MName09))){
                        query += (", MName09='" + s[0] + "'");
                    }
                }
                if((s[1]).equals(jComboBoxMalt10.getSelectedItem().toString())){
                    if(!s[0].equals(Integer.toString(DBA.MName10))){
                        query += (", MName10='" + s[0] + "'");
                    }
                }
            }

             for(String s[] : Hops){
                if((s[1]).equals(jComboBoxHop1.getSelectedItem().toString())){
                    if(!s[0].equals(Integer.toString(DBA.HName01))){
                        query += (", HName01='" + s[0] + "'");
                    }
                }
                if((s[1]).equals(jComboBoxHop2.getSelectedItem().toString())){
                    if(!s[0].equals(Integer.toString(DBA.HName02))){
                        query += (", HName02='" + s[0] + "'");
                    }
                }
                if((s[1]).equals(jComboBoxHop3.getSelectedItem().toString())){
                    if(!s[0].equals(Integer.toString(DBA.HName03))){
                        query += (", HName03='" + s[0] + "'");
                    }
                }
                if((s[1]).equals(jComboBoxHop4.getSelectedItem().toString())){
                    if(!s[0].equals(Integer.toString(DBA.HName04))){
                        query += (", HName04='" + s[0] + "'");
                    }
                }
                if((s[1]).equals(jComboBoxHop5.getSelectedItem().toString())){
                    if(!s[0].equals(Integer.toString(DBA.HName05))){
                        query += (", HName05='" + s[0] + "'");
                    }
                }
                if((s[1]).equals(jComboBoxHop6.getSelectedItem().toString())){
                    if(!s[0].equals(Integer.toString(DBA.HName06))){
                        query += (", HName06='" + s[0] + "'");
                    }
                }
                if((s[1]).equals(jComboBoxHop7.getSelectedItem().toString())){
                    if(!s[0].equals(Integer.toString(DBA.HName07))){
                        query += (", HName07='" + s[0] + "'");
                    }
                }
                if((s[1]).equals(jComboBoxHop8.getSelectedItem().toString())){
                    if(!s[0].equals(Integer.toString(DBA.HName08))){
                        query += (", HName08='" + s[0] + "'");
                    }
                }
                if((s[1]).equals(jComboBoxHop9.getSelectedItem().toString())){
                    if(!s[0].equals(Integer.toString(DBA.HName09))){
                        query += (", HName09='" + s[0] + "'");
                    }
                }
                if((s[1]).equals(jComboBoxHop10.getSelectedItem().toString())){
                    if(!s[0].equals(Integer.toString(DBA.HName10))){
                        query += (", HName10='" + s[0] + "'");
                    }
                }
                if((s[1]).equals(jComboBoxDHop1.getSelectedItem().toString())){
                    if(!s[0].equals(Integer.toString(DBA.DHHop1))){
                        query += (", DHHop1='" + s[0] + "'");
                    }
                }
                if((s[1]).equals(jComboBoxDHop2.getSelectedItem().toString())){
                    if(!s[0].equals(Integer.toString(DBA.DHHop2))){
                        query += (", DHHop2='" + s[0] + "'");
                    }
                }
                if((s[1]).equals(jComboBoxDHop3.getSelectedItem().toString())){
                    if(!s[0].equals(Integer.toString(DBA.DHHop3))){
                        query += (", DHHop3='" + s[0] + "'");
                    }
                }
                if((s[1]).equals(jComboBoxDHop4.getSelectedItem().toString())){
                    if(!s[0].equals(Integer.toString(DBA.DHHop4))){
                        query += (", DHHop4='" + s[0] + "'");
                    }
                }
            }

            for(String s[] : Yeast){
                if((s[1]).equals(jComboBoxYeast.getSelectedItem().toString())){
                    if(!s[0].equals(Integer.toString(DBA.YeastName))){
                        query += (", YeastName='" + s[0] + "'");
                    }
                }
            }

            //Check text fields for changes.
            if (!jTextFieldTG.getText().equals(f3.format(DBA.RGT))){
                query += (", RGT='" + jTextFieldTG.getText() + "'");
            }
            if (!jTextFieldVol.getText().equals(f.format(DBA.RVol))){
                query += (", RVol='" + jTextFieldVol.getText() + "'");
            }

            //Check Malt Percentages.
            if ((!jTextFieldMPct1.getText().equals(Float.toString(DBA.Mpct01)))&&(!jTextFieldMPct1.getText().equals(""))){
                query += (", Mpct01='" + jTextFieldMPct1.getText() + "'");
            }
            if ((!jTextFieldMPct2.getText().equals(Float.toString(DBA.Mpct02)))&&(!jTextFieldMPct2.getText().equals(""))){
                query += (", Mpct02='" + jTextFieldMPct2.getText() + "'");
            }
            if ((!jTextFieldMPct3.getText().equals(Float.toString(DBA.Mpct03)))&&(!jTextFieldMPct3.getText().equals(""))){
                query += (", Mpct03='" + jTextFieldMPct3.getText() + "'");
            }
            if ((!jTextFieldMPct4.getText().equals(Float.toString(DBA.Mpct04)))&&(!jTextFieldMPct4.getText().equals(""))){
                query += (", Mpct04='" + jTextFieldMPct4.getText() + "'");
            }
            if ((!jTextFieldMPct5.getText().equals(Float.toString(DBA.Mpct05)))&&(!jTextFieldMPct5.getText().equals(""))){
                query += (", Mpct05='" + jTextFieldMPct5.getText() + "'");
            }
            if ((!jTextFieldMPct6.getText().equals(Float.toString(DBA.Mpct06)))&&(!jTextFieldMPct6.getText().equals(""))){
                query += (", Mpct06='" + jTextFieldMPct6.getText() + "'");
            }
            if ((!jTextFieldMPct7.getText().equals(Float.toString(DBA.Mpct07)))&&(!jTextFieldMPct7.getText().equals(""))){
                query += (", Mpct07='" + jTextFieldMPct7.getText() + "'");
            }
            if ((!jTextFieldMPct8.getText().equals(Float.toString(DBA.Mpct08)))&&(!jTextFieldMPct8.getText().equals(""))){
                query += (", Mpct08='" + jTextFieldMPct8.getText() + "'");
            }
            if ((!jTextFieldMPct9.getText().equals(Float.toString(DBA.Mpct09)))&&(!jTextFieldMPct9.getText().equals(""))){
                query += (", Mpct09='" + jTextFieldMPct9.getText() + "'");
            }
            if ((!jTextFieldMPct10.getText().equals(Float.toString(DBA.Mpct10)))&&(!jTextFieldMPct10.getText().equals(""))){
                query += (", Mpct10='" + jTextFieldMPct10.getText() + "'");
            }
            
            //Hops Time
            if ((!jTextFieldHopTime1.getText().equals(Float.toString(DBA.AApct01)))&&(!jTextFieldHopTime1.getText().equals(""))){
                query += (", AApct01='" + jTextFieldHopTime1.getText() + "'");
            }
            if ((!jTextFieldHopTime2.getText().equals(Float.toString(DBA.AApct02)))&&(!jTextFieldHopTime2.getText().equals(""))){
                query += (", AApct02='" + jTextFieldHopTime2.getText() + "'");
            }
            if ((!jTextFieldHopTime3.getText().equals(Float.toString(DBA.AApct03)))&&(!jTextFieldHopTime3.getText().equals(""))){
                query += (", AApct03='" + jTextFieldHopTime3.getText() + "'");
            }
            if ((!jTextFieldHopTime4.getText().equals(Float.toString(DBA.AApct04)))&&(!jTextFieldHopTime4.getText().equals(""))){
                query += (", AApct04='" + jTextFieldHopTime4.getText() + "'");
            }
            if ((!jTextFieldHopTime5.getText().equals(Float.toString(DBA.AApct05)))&&(!jTextFieldHopTime5.getText().equals(""))){
                query += (", AApct05='" + jTextFieldHopTime5.getText() + "'");
            }
            if ((!jTextFieldHopTime6.getText().equals(Float.toString(DBA.AApct06)))&&(!jTextFieldHopTime6.getText().equals(""))){
                query += (", AApct06='" + jTextFieldHopTime6.getText() + "'");
            }
            if ((!jTextFieldHopTime7.getText().equals(Float.toString(DBA.AApct07)))&&(!jTextFieldHopTime7.getText().equals(""))){
                query += (", AApct07='" + jTextFieldHopTime7.getText() + "'");
            }
            if ((!jTextFieldHopTime8.getText().equals(Float.toString(DBA.AApct08)))&&(!jTextFieldHopTime8.getText().equals(""))){
                query += (", AApct08='" + jTextFieldHopTime8.getText() + "'");
            }
            if ((!jTextFieldHopTime9.getText().equals(Float.toString(DBA.AApct09)))&&(!jTextFieldHopTime9.getText().equals(""))){
                query += (", AApct09='" + jTextFieldHopTime9.getText() + "'");
            }
            if ((!jTextFieldHopTime10.getText().equals(Float.toString(DBA.AApct10)))&&(!jTextFieldHopTime10.getText().equals(""))){
                query += (", AApct10='" + jTextFieldHopTime10.getText() + "'");
            }
            
            //Hop lbs.
            if ((!jTextFieldHopLbs1.getText().equals(Float.toString(DBA.hlbs01)))&&(!jTextFieldHopLbs1.getText().equals(""))){
                query += (", hlbs01='" + jTextFieldHopLbs1.getText() + "'");
            }
            if ((!jTextFieldHopLbs2.getText().equals(Float.toString(DBA.hlbs02)))&&(!jTextFieldHopLbs2.getText().equals(""))){
                query += (", hlbs02='" + jTextFieldHopLbs2.getText() + "'");
            }
            if ((!jTextFieldHopLbs3.getText().equals(Float.toString(DBA.hlbs03)))&&(!jTextFieldHopLbs3.getText().equals(""))){
                query += (", hlbs03='" + jTextFieldHopLbs3.getText() + "'");
            }
            if ((!jTextFieldHopLbs4.getText().equals(Float.toString(DBA.hlbs04)))&&(!jTextFieldHopLbs4.getText().equals(""))){
                query += (", hlbs04='" + jTextFieldHopLbs4.getText() + "'");
            }
            if ((!jTextFieldHopLbs5.getText().equals(Float.toString(DBA.hlbs05)))&&(!jTextFieldHopLbs5.getText().equals(""))){
                query += (", hlbs05='" + jTextFieldHopLbs5.getText() + "'");
            }
            if ((!jTextFieldHopLbs6.getText().equals(Float.toString(DBA.hlbs06)))&&(!jTextFieldHopLbs6.getText().equals(""))){
                query += (", hlbs06='" + jTextFieldHopLbs6.getText() + "'");
            }
            if ((!jTextFieldHopLbs7.getText().equals(Float.toString(DBA.hlbs07)))&&(!jTextFieldHopLbs7.getText().equals(""))){
                query += (", hlbs07='" + jTextFieldHopLbs7.getText() + "'");
            }
            if ((!jTextFieldHopLbs8.getText().equals(Float.toString(DBA.hlbs08)))&&(!jTextFieldHopLbs8.getText().equals(""))){
                query += (", hlbs08='" + jTextFieldHopLbs8.getText() + "'");
            }
            if ((!jTextFieldHopLbs9.getText().equals(Float.toString(DBA.hlbs09)))&&(!jTextFieldHopLbs9.getText().equals(""))){
                query += (", hlbs09='" + jTextFieldHopLbs9.getText() + "'");
            }
            if ((!jTextFieldHopLbs10.getText().equals(Float.toString(DBA.hlbs10)))&&(!jTextFieldHopLbs10.getText().equals(""))){
                query += (", hlbs10='" + jTextFieldHopLbs10.getText() + "'");
            }

            //Hop FWH
            if(jCheckBoxHop1FWH.isSelected() != DBA.fwh1){
                query += (", fwh1='" + Integer.toString((jCheckBoxHop1FWH.isSelected())?1:0) + "'");
            }
            if(jCheckBoxHop2FWH.isSelected() != DBA.fwh2){
                query += (", fwh2='" + Integer.toString((jCheckBoxHop2FWH.isSelected())?1:0) + "'");
            }

            //Mineral additions.
            if (!jTextFieldGyp.getText().equals(Float.toString(DBA.gGypsum))){
                query += (", gGypsum='" + jTextFieldGyp.getText() + "'");
            }
            if (!jTextFieldCaCl.getText().equals(Float.toString(DBA.gCaCl))){
                query += (", gCaCl='" + jTextFieldCaCl.getText() + "'");
            }
            if (!jTextFieldEpsom.getText().equals(Float.toString(DBA.gEpsomSalt))){
                query += (", gEpsomSalt='" + jTextFieldEpsom.getText() + "'");
            }
            if (!jTextFieldChalk.getText().equals(Float.toString(DBA.gChalk))){
                query += (", gChalk='" + jTextFieldChalk.getText() + "'");
            }
            if (!jTextFieldNaCl.getText().equals(Float.toString(DBA.gTableSalt))){
                query += (", gTableSalt='" + jTextFieldNaCl.getText() + "'");
            }

            //Mash data.
            if (!jTextFieldRatio.getText().equals(Float.toString(DBA.ratio))){
                query += (", ratio='" + jTextFieldRatio.getText() + "'");
            }
            if (!jTextFieldTargetTemp.getText().equals(Float.toString(DBA.ttemp))){
                query += (", ttemp='" + jTextFieldTargetTemp.getText() + "'");
            }

            //Yeast Data.
            if (!jTextFieldPTemp.getText().equals(Float.toString(DBA.PTemp))){
                query += (", PTemp='" + jTextFieldPTemp.getText() + "'");
            }

            //Dryhop Data
            if ((!jTextFieldDHopDay1.getText().equals(Float.toString(DBA.DHDay1)))&&(!jTextFieldDHopDay1.getText().equals(""))){
                query += (", DHDay1='" + jTextFieldDHopDay1.getText() + "'");
            }
            if ((!jTextFieldDHopDay2.getText().equals(Float.toString(DBA.DHDay2)))&&(!jTextFieldDHopDay2.getText().equals(""))){
                query += (", DHDay2='" + jTextFieldDHopDay2.getText() + "'");
            }
            if ((!jTextFieldDHopDay3.getText().equals(Float.toString(DBA.DHDay3)))&&(!jTextFieldDHopDay3.getText().equals(""))){
                query += (", DHDay3='" + jTextFieldDHopDay3.getText() + "'");
            }
            if ((!jTextFieldDHopDay4.getText().equals(Float.toString(DBA.DHDay4)))&&(!jTextFieldDHopDay4.getText().equals(""))){
                query += (", DHDay4='" + jTextFieldDHopDay4.getText() + "'");
            }
            if ((!jTextFieldDHopLbs1.getText().equals(Float.toString(DBA.DHLbs1)))&&(!jTextFieldDHopLbs1.getText().equals(""))){
                query += (", DHLbs1='" + jTextFieldDHopLbs1.getText() + "'");
            }
            if ((!jTextFieldDHopLbs2.getText().equals(Float.toString(DBA.DHLbs2)))&&(!jTextFieldDHopLbs2.getText().equals(""))){
                query += (", DHLbs2='" + jTextFieldDHopLbs2.getText() + "'");
            }
            if ((!jTextFieldDHopLbs3.getText().equals(Float.toString(DBA.DHLbs3)))&&(!jTextFieldDHopLbs3.getText().equals(""))){
                query += (", DHLbs3='" + jTextFieldDHopLbs3.getText() + "'");
            }
            if ((!jTextFieldDHopLbs4.getText().equals(Float.toString(DBA.DHLbs4)))&&(!jTextFieldDHopLbs4.getText().equals(""))){
                query += (", DHLbs4='" + jTextFieldDHopLbs4.getText() + "'");
            }

            //End query statement.
            query += " WHERE RID = '" + RecipeID + "'";

            DBA.RunSQLUpdateQuery(query);

            //Update beer display in combo box.
            DBA.GetRecipesData(RecipeID);
            Recipes.clear();
            Recipes = DBA.RunSQLQuery("SELECT RID,RName,RRev FROM Recipes");

            jComboBoxRecipe.removeAllItems();
            for(String s[] : Recipes){
                jComboBoxRecipe.addItem(s[0] + ": " + s[1] + " - Rev " + s[2]);
            }
            jComboBoxRecipe.setSelectedItem(Integer.toString(DBA.RecpID) + ": " +
                    DBA.RName + " - Rev " + Integer.toString(DBA.RRev));

            //Close DB Connection.
            DBA.closeDBCon();

            SetData();
        }
    }

    public float CalcIBU(){
        //Calculate the IBUs specified in the brew.
        double IBUTOT = 0;
        float VolFinal = (Float.valueOf(jTextFieldVol.getText().toString().trim()).floatValue())* 31;
        float GUtot = ((Float.valueOf(jTextFieldTG.getText().toString().trim()).floatValue())- 1) * 1000 * VolFinal;
        
        //Determine CGrav.
        double BoilVol = ((VolFinal + 0.5)/(0.96 * 0.9542));
        double Gstart = ((GUtot/BoilVol)+1000)/1000;
        double CGRAV = 1;
        if((1+((Gstart - 1.05)/2)) < 1){
            CGRAV = 1;
        } else {
            CGRAV = (1+((Gstart - 1.05)/2));
        }
        
        double eff;
        double ibu;

        //Open DB Connection.
        DBA.openDBCon();

        //Look through hops data to determine IBUs of recipe.
        DBA.GetHopsData(Integer.toString(DBA.HName01));
        eff = DBA.GetUtil(DBA.HopWhole, (long)DBA.AApct01);
        ibu = (((DBA.hlbs01 * 16) * eff * (DBA.HopAA/100) * 7489)/(VolFinal * CGRAV));
        IBUTOT += ibu;

        DBA.GetHopsData(Integer.toString(DBA.HName02));
        eff = DBA.GetUtil(DBA.HopWhole, (long)DBA.AApct02);
        ibu = (((DBA.hlbs02 * 16) * eff * (DBA.HopAA/100) * 7489)/(VolFinal * CGRAV));
        IBUTOT += ibu;

        DBA.GetHopsData(Integer.toString(DBA.HName03));
        eff = DBA.GetUtil(DBA.HopWhole, (long)DBA.AApct03);
        ibu = (((DBA.hlbs03 * 16) * eff * (DBA.HopAA/100) * 7489)/(VolFinal * CGRAV));
        IBUTOT += ibu;

        DBA.GetHopsData(Integer.toString(DBA.HName04));
        eff = DBA.GetUtil(DBA.HopWhole, (long)DBA.AApct04);
        ibu = (((DBA.hlbs04 * 16) * eff * (DBA.HopAA/100) * 7489)/(VolFinal * CGRAV));
        IBUTOT += ibu;

        DBA.GetHopsData(Integer.toString(DBA.HName05));
        eff = DBA.GetUtil(DBA.HopWhole, (long)DBA.AApct05);
        ibu = (((DBA.hlbs05 * 16) * eff * (DBA.HopAA/100) * 7489)/(VolFinal * CGRAV));
        IBUTOT += ibu;

        DBA.GetHopsData(Integer.toString(DBA.HName06));
        eff = DBA.GetUtil(DBA.HopWhole, (long)DBA.AApct06);
        ibu = (((DBA.hlbs06 * 16) * eff * (DBA.HopAA/100) * 7489)/(VolFinal * CGRAV));
        IBUTOT += ibu;

        DBA.GetHopsData(Integer.toString(DBA.HName07));
        eff = DBA.GetUtil(DBA.HopWhole, (long)DBA.AApct07);
        ibu = (((DBA.hlbs07 * 16) * eff * (DBA.HopAA/100) * 7489)/(VolFinal * CGRAV));
        IBUTOT += ibu;

        DBA.GetHopsData(Integer.toString(DBA.HName08));
        eff = DBA.GetUtil(DBA.HopWhole, (long)DBA.AApct08);
        ibu = (((DBA.hlbs08 * 16) * eff * (DBA.HopAA/100) * 7489)/(VolFinal * CGRAV));
        IBUTOT += ibu;

        DBA.GetHopsData(Integer.toString(DBA.HName09));
        eff = DBA.GetUtil(DBA.HopWhole, (long)DBA.AApct09);
        ibu = (((DBA.hlbs09 * 16) * eff * (DBA.HopAA/100) * 7489)/(VolFinal * CGRAV));
        IBUTOT += ibu;

        DBA.GetHopsData(Integer.toString(DBA.HName10));
        eff = DBA.GetUtil(DBA.HopWhole, (long)DBA.AApct10);
        ibu = (((DBA.hlbs10 * 16) * eff * (DBA.HopAA/100) * 7489)/(VolFinal * CGRAV));
        IBUTOT += ibu;

        //Close DB connection.
        DBA.closeDBCon();
        return (float)IBUTOT;
    }

    @Action
    public void NewRev() {
        int response = JOptionPane.showConfirmDialog(null,
                "This will create a new revision of the current recipe, Continue? ",
                "Warning",JOptionPane.WARNING_MESSAGE);
        if (response == 0){
            //Set the update button visible.
            jButtonSubmitRecipe.setVisible(true);

            //Hide all other buttons.
            jButtonNewRev.setVisible(false);
            jButtonNewRecipe.setVisible(false);
            jButtonUpdateRecipe.setVisible(false);
            jComboBoxRecipe.setVisible(false);
            jButtonCustFirst.setVisible(false);
            jButtonCustLast.setVisible(false);
            jButtonCustNext.setVisible(false);
            jButtonCustPrev.setVisible(false);

            //Get Revision value and increment it.
            int rv = Integer.parseInt(jTextFieldRRev.getText());
            rv++;
            jTextFieldRRev.setText(Integer.toString(rv));
        }
    }

    @Action
    public void NewRecipe() {
        int response = JOptionPane.showConfirmDialog(null,
                "This will create a new recipe, Continue? ",
                "Warning",JOptionPane.WARNING_MESSAGE);
        if (response == 0){
            //Set the update button visible.
            jButtonSubmitRecipe.setVisible(true);

            //Hide all other buttons.
            jButtonNewRev.setVisible(false);
            jButtonNewRecipe.setVisible(false);
            jButtonUpdateRecipe.setVisible(false);
            jComboBoxRecipe.setVisible(false);
            jButtonCustFirst.setVisible(false);
            jButtonCustLast.setVisible(false);
            jButtonCustNext.setVisible(false);
            jButtonCustPrev.setVisible(false);

            //Set Revision to 1
            jTextFieldRRev.setText("1");

            //Clear out all fields.
            jComboBoxMalt1.setSelectedIndex(0);
            jComboBoxMalt2.setSelectedIndex(0);
            jComboBoxMalt3.setSelectedIndex(0);
            jComboBoxMalt4.setSelectedIndex(0);
            jComboBoxMalt5.setSelectedIndex(0);
            jComboBoxMalt6.setSelectedIndex(0);
            jComboBoxMalt7.setSelectedIndex(0);
            jComboBoxMalt8.setSelectedIndex(0);
            jComboBoxMalt9.setSelectedIndex(0);
            jComboBoxMalt10.setSelectedIndex(0);
            jComboBoxHop1.setSelectedIndex(0);
            jComboBoxHop2.setSelectedIndex(0);
            jComboBoxHop3.setSelectedIndex(0);
            jComboBoxHop4.setSelectedIndex(0);
            jComboBoxHop5.setSelectedIndex(0);
            jComboBoxHop6.setSelectedIndex(0);
            jComboBoxHop7.setSelectedIndex(0);
            jComboBoxHop8.setSelectedIndex(0);
            jComboBoxHop9.setSelectedIndex(0);
            jComboBoxHop10.setSelectedIndex(0);
            jComboBoxDHop1.setSelectedIndex(0);
            jComboBoxDHop2.setSelectedIndex(0);
            jComboBoxDHop3.setSelectedIndex(0);
            jComboBoxDHop4.setSelectedIndex(0);
            jCheckBoxHop1FWH.setSelected(false);
            jCheckBoxHop2FWH.setSelected(false);
            jTextFieldMPct1.setText("");
            jTextFieldMPct2.setText("");
            jTextFieldMPct3.setText("");
            jTextFieldMPct4.setText("");
            jTextFieldMPct5.setText("");
            jTextFieldMPct6.setText("");
            jTextFieldMPct7.setText("");
            jTextFieldMPct8.setText("");
            jTextFieldMPct9.setText("");
            jTextFieldMPct10.setText("");
            jTextFieldHopTime1.setText("");
            jTextFieldHopLbs1.setText("");
            jTextFieldHopTime2.setText("");
            jTextFieldHopLbs2.setText("");
            jTextFieldHopTime3.setText("");
            jTextFieldHopLbs3.setText("");
            jTextFieldHopTime4.setText("");
            jTextFieldHopLbs4.setText("");
            jTextFieldHopTime5.setText("");
            jTextFieldHopLbs5.setText("");
            jTextFieldHopTime6.setText("");
            jTextFieldHopLbs6.setText("");
            jTextFieldHopTime7.setText("");
            jTextFieldHopLbs7.setText("");
            jTextFieldHopTime8.setText("");
            jTextFieldHopLbs8.setText("");
            jTextFieldHopTime9.setText("");
            jTextFieldHopLbs9.setText("");
            jTextFieldHopTime10.setText("");
            jTextFieldHopLbs10.setText("");
            jTextFieldDHopDay1.setText("");
            jTextFieldDHopLbs1.setText("");
            jTextFieldDHopDay2.setText("");
            jTextFieldDHopLbs2.setText("");
            jTextFieldDHopDay3.setText("");
            jTextFieldDHopLbs3.setText("");
            jTextFieldDHopDay4.setText("");
            jTextFieldDHopLbs4.setText("");
            jLabelRecipeID.setText("0");
            jLabelRSRM.setText("0");
            jLabelRIBU.setText("0");
            jTextFieldRName.setText("");
            jTextFieldTG.setText("");
            jTextFieldVol.setText("");
            jTextFieldGyp.setText("");
            jTextFieldCaCl.setText("");
            jTextFieldChalk.setText("");
            jTextFieldEpsom.setText("");
            jTextFieldNaCl.setText("");
            jTextFieldRatio.setText("");
            jTextFieldTargetTemp.setText("");
            jTextFieldPTemp.setText("");
        }
    }

    @Action
    public void SubmitRecipeData() {
        int response = JOptionPane.showConfirmDialog(null,
                "This will submit this recipe to the database, Continue? ",
                "Warning",JOptionPane.WARNING_MESSAGE);

        //Check to make sure all percentages add up to 100.
        double fl = 0;
        if(!jTextFieldMPct1.getText().equals(""))fl += Double.valueOf(jTextFieldMPct1.getText().trim()).doubleValue();
        if(!jTextFieldMPct2.getText().equals(""))fl += Double.valueOf(jTextFieldMPct2.getText().trim()).doubleValue();
        if(!jTextFieldMPct3.getText().equals(""))fl += Double.valueOf(jTextFieldMPct3.getText().trim()).doubleValue();
        if(!jTextFieldMPct4.getText().equals(""))fl += Double.valueOf(jTextFieldMPct4.getText().trim()).doubleValue();
        if(!jTextFieldMPct5.getText().equals(""))fl += Double.valueOf(jTextFieldMPct5.getText().trim()).doubleValue();
        if(!jTextFieldMPct6.getText().equals(""))fl += Double.valueOf(jTextFieldMPct6.getText().trim()).doubleValue();
        if(!jTextFieldMPct7.getText().equals(""))fl += Double.valueOf(jTextFieldMPct7.getText().trim()).doubleValue();
        if(!jTextFieldMPct8.getText().equals(""))fl += Double.valueOf(jTextFieldMPct8.getText().trim()).doubleValue();
        if(!jTextFieldMPct9.getText().equals(""))fl += Double.valueOf(jTextFieldMPct9.getText().trim()).doubleValue();
        if(!jTextFieldMPct10.getText().equals(""))fl += Double.valueOf(jTextFieldMPct10.getText().trim()).doubleValue();

        if (fl != 100){
            int rsps = JOptionPane.showConfirmDialog(null,
                    "Check percentage values, only accounting for " + Double.toString(fl) + "%",
                    "Error",JOptionPane.ERROR_MESSAGE);
            response = 1;
        }

        if (response == 0){
            //Get Calculated IBUs.
            float RecipeIBU = CalcIBU();

            DBA.openDBCon();

            String query = "'" +
                jTextFieldRRev.getText() + "','" +
                Float.toString(RecipeIBU) + "'";

            String fields = "RRev,RIBU";

            DBA.RunSQLInsertQuery("Recipes",fields,query);

            //jLabelRecipeID.setText(DBA.GetLastIndex("Recipes", "RID"));
            jLabelRecipeID.setText(Integer.toString(Global.lastInsertID));
            
            //Run updates
            //String RecipeID = DBA.GetLastIndex("Recipes", "RID");
            String RecipeID = Integer.toString(Global.lastInsertID);

            //Start query statemetn.
            query = "UPDATE Recipes SET ";

            //Always fill in Recipe Name to ensure no comma problems.
            query += ("RName='" + jTextFieldRName.getText() + "'");

            for(String s[] : Malt){
                if((s[1]).equals(jComboBoxMalt1.getSelectedItem().toString())){
                        query += (", MName01='" + s[0] + "'");
                }
                if((s[1]).equals(jComboBoxMalt2.getSelectedItem().toString())){
                        query += (", MName02='" + s[0] + "'");
                }
                if((s[1]).equals(jComboBoxMalt3.getSelectedItem().toString())){
                        query += (", MName03='" + s[0] + "'");
                }
                if((s[1]).equals(jComboBoxMalt4.getSelectedItem().toString())){
                        query += (", MName04='" + s[0] + "'");
                }
                if((s[1]).equals(jComboBoxMalt5.getSelectedItem().toString())){
                        query += (", MName05='" + s[0] + "'");
                }
                if((s[1]).equals(jComboBoxMalt6.getSelectedItem().toString())){
                        query += (", MName06='" + s[0] + "'");
                }
                if((s[1]).equals(jComboBoxMalt7.getSelectedItem().toString())){
                        query += (", MName07='" + s[0] + "'");
                }
                if((s[1]).equals(jComboBoxMalt8.getSelectedItem().toString())){
                        query += (", MName08='" + s[0] + "'");
                }
                if((s[1]).equals(jComboBoxMalt9.getSelectedItem().toString())){
                        query += (", MName09='" + s[0] + "'");
                }
                if((s[1]).equals(jComboBoxMalt10.getSelectedItem().toString())){
                        query += (", MName10='" + s[0] + "'");
                }
            }

             for(String s[] : Hops){
                if((s[1]).equals(jComboBoxHop1.getSelectedItem().toString())){
                        query += (", HName01='" + s[0] + "'");
                }
                if((s[1]).equals(jComboBoxHop2.getSelectedItem().toString())){
                        query += (", HName02='" + s[0] + "'");
                }
                if((s[1]).equals(jComboBoxHop3.getSelectedItem().toString())){
                        query += (", HName03='" + s[0] + "'");
                }
                if((s[1]).equals(jComboBoxHop4.getSelectedItem().toString())){
                        query += (", HName04='" + s[0] + "'");
                }
                if((s[1]).equals(jComboBoxHop5.getSelectedItem().toString())){
                        query += (", HName05='" + s[0] + "'");
                }
                if((s[1]).equals(jComboBoxHop6.getSelectedItem().toString())){
                        query += (", HName06='" + s[0] + "'");
                }
                if((s[1]).equals(jComboBoxHop7.getSelectedItem().toString())){
                        query += (", HName07='" + s[0] + "'");
                }
                if((s[1]).equals(jComboBoxHop8.getSelectedItem().toString())){
                        query += (", HName08='" + s[0] + "'");
                }
                if((s[1]).equals(jComboBoxHop9.getSelectedItem().toString())){
                        query += (", HName09='" + s[0] + "'");
                }
                if((s[1]).equals(jComboBoxHop10.getSelectedItem().toString())){
                        query += (", HName10='" + s[0] + "'");
                }
                if((s[1]).equals(jComboBoxDHop1.getSelectedItem().toString())){
                        query += (", DHHop1='" + s[0] + "'");
                }
                if((s[1]).equals(jComboBoxDHop2.getSelectedItem().toString())){
                        query += (", DHHop2='" + s[0] + "'");
                }
                if((s[1]).equals(jComboBoxDHop3.getSelectedItem().toString())){
                        query += (", DHHop3='" + s[0] + "'");
                }
                if((s[1]).equals(jComboBoxDHop4.getSelectedItem().toString())){
                        query += (", DHHop4='" + s[0] + "'");
                }
            }

            for(String s[] : Yeast){
                if((s[1]).equals(jComboBoxYeast.getSelectedItem().toString())){
                        query += (", YeastName='" + s[0] + "'");
                }
            }

            //Check text fields for changes.
                query += (", RGT='" + jTextFieldTG.getText() + "'");
                query += (", RVol='" + jTextFieldVol.getText() + "'");

            //Check Malt Percentages.
            query += (", Mpct01='" + jTextFieldMPct1.getText() + "'");
            query += (", Mpct02='" + jTextFieldMPct2.getText() + "'");
            query += (", Mpct03='" + jTextFieldMPct3.getText() + "'");
            query += (", Mpct04='" + jTextFieldMPct4.getText() + "'");
            query += (", Mpct05='" + jTextFieldMPct5.getText() + "'");
            query += (", Mpct06='" + jTextFieldMPct6.getText() + "'");
            query += (", Mpct07='" + jTextFieldMPct7.getText() + "'");
            query += (", Mpct08='" + jTextFieldMPct8.getText() + "'");
            query += (", Mpct09='" + jTextFieldMPct9.getText() + "'");
            query += (", Mpct10='" + jTextFieldMPct10.getText() + "'");
            

            //Hops Time
            query += (", AApct01='" + jTextFieldHopTime1.getText() + "'");
            query += (", AApct02='" + jTextFieldHopTime2.getText() + "'");
            query += (", AApct03='" + jTextFieldHopTime3.getText() + "'");
            query += (", AApct04='" + jTextFieldHopTime4.getText() + "'");
            query += (", AApct05='" + jTextFieldHopTime5.getText() + "'");
            query += (", AApct06='" + jTextFieldHopTime6.getText() + "'");
            query += (", AApct07='" + jTextFieldHopTime7.getText() + "'");
            query += (", AApct08='" + jTextFieldHopTime8.getText() + "'");
            query += (", AApct09='" + jTextFieldHopTime9.getText() + "'");
            query += (", AApct10='" + jTextFieldHopTime10.getText() + "'");
            

            //Hop lbs.
            query += (", hlbs01='" + jTextFieldHopLbs1.getText() + "'");
            query += (", hlbs02='" + jTextFieldHopLbs2.getText() + "'");
            query += (", hlbs03='" + jTextFieldHopLbs3.getText() + "'");
            query += (", hlbs04='" + jTextFieldHopLbs4.getText() + "'");
            query += (", hlbs05='" + jTextFieldHopLbs5.getText() + "'");
            query += (", hlbs06='" + jTextFieldHopLbs6.getText() + "'");
            query += (", hlbs07='" + jTextFieldHopLbs7.getText() + "'");
            query += (", hlbs08='" + jTextFieldHopLbs8.getText() + "'");
            query += (", hlbs09='" + jTextFieldHopLbs9.getText() + "'");
            query += (", hlbs10='" + jTextFieldHopLbs10.getText() + "'");
            

            //Hop FWH
            query += (", fwh1='" + Integer.toString((jCheckBoxHop1FWH.isSelected())?1:0) + "'");
            query += (", fwh2='" + Integer.toString((jCheckBoxHop2FWH.isSelected())?1:0) + "'");
            

            //Mineral additions.
            query += (", gGypsum='" + jTextFieldGyp.getText() + "'");
            query += (", gCaCl='" + jTextFieldCaCl.getText() + "'");
            query += (", gEpsomSalt='" + jTextFieldEpsom.getText() + "'");
            query += (", gChalk='" + jTextFieldChalk.getText() + "'");
            query += (", gTableSalt='" + jTextFieldNaCl.getText() + "'");
            

            //Mash data.
            query += (", ratio='" + jTextFieldRatio.getText() + "'");
            query += (", ttemp='" + jTextFieldTargetTemp.getText() + "'");
            

            //Yeast Data.
            query += (", PTemp='" + jTextFieldPTemp.getText() + "'");
            

            //Dryhop Data
            query += (", DHDay1='" + jTextFieldDHopDay1.getText() + "'");
            query += (", DHDay2='" + jTextFieldDHopDay2.getText() + "'");
            query += (", DHDay3='" + jTextFieldDHopDay3.getText() + "'");
            query += (", DHDay4='" + jTextFieldDHopDay4.getText() + "'");
            query += (", DHLbs1='" + jTextFieldDHopLbs1.getText() + "'");
            query += (", DHLbs2='" + jTextFieldDHopLbs2.getText() + "'");
            query += (", DHLbs3='" + jTextFieldDHopLbs3.getText() + "'");
            query += (", DHLbs4='" + jTextFieldDHopLbs4.getText() + "'");
            

            //End query statement.
            query += " WHERE RID = '" + RecipeID + "'";

            DBA.RunSQLUpdateQuery(query);

            //close DB connection.
            DBA.closeDBCon();
        }

        //Set the update button visible.
        jButtonSubmitRecipe.setVisible(false);

        //Hide all other buttons.
        jButtonNewRev.setVisible(true);
        jButtonNewRecipe.setVisible(true);
        jButtonUpdateRecipe.setVisible(true);
        jComboBoxRecipe.setVisible(true);
        jButtonCustFirst.setVisible(true);
        jButtonCustLast.setVisible(true);
        jButtonCustNext.setVisible(true);
        jButtonCustPrev.setVisible(true);

        Recipes.clear();

        DBA.openDBCon();
        
        Recipes = DBA.RunSQLQuery("SELECT RID,RName,RRev FROM Recipes");
        int x = Recipes.size() - 1;
        String str[] = Recipes.get(x);
        jComboBoxRecipe.addItem(str[0] + ": " + str[1] + " - Rev " + str[2]);

        DBA.closeDBCon();

        LastRecord();

    }

    @Action
    public void PrintRecipe() {
        Global.PrintRecipeID = jLabelRecipeID.getText();
        PrintRecipe PR = new PrintRecipe();
        PR.PrintSO();
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButtonCustFirst;
    private javax.swing.JButton jButtonCustLast;
    private javax.swing.JButton jButtonCustNext;
    private javax.swing.JButton jButtonCustPrev;
    private javax.swing.JButton jButtonExit;
    private javax.swing.JButton jButtonNewRecipe;
    private javax.swing.JButton jButtonNewRev;
    private javax.swing.JButton jButtonPrint;
    private javax.swing.JButton jButtonSubmitRecipe;
    private javax.swing.JButton jButtonUpdateRecipe;
    private javax.swing.JCheckBox jCheckBoxHop1FWH;
    private javax.swing.JCheckBox jCheckBoxHop2FWH;
    private javax.swing.JComboBox jComboBoxDHop1;
    private javax.swing.JComboBox jComboBoxDHop2;
    private javax.swing.JComboBox jComboBoxDHop3;
    private javax.swing.JComboBox jComboBoxDHop4;
    private javax.swing.JComboBox jComboBoxHop1;
    private javax.swing.JComboBox jComboBoxHop10;
    private javax.swing.JComboBox jComboBoxHop2;
    private javax.swing.JComboBox jComboBoxHop3;
    private javax.swing.JComboBox jComboBoxHop4;
    private javax.swing.JComboBox jComboBoxHop5;
    private javax.swing.JComboBox jComboBoxHop6;
    private javax.swing.JComboBox jComboBoxHop7;
    private javax.swing.JComboBox jComboBoxHop8;
    private javax.swing.JComboBox jComboBoxHop9;
    private javax.swing.JComboBox jComboBoxMalt1;
    private javax.swing.JComboBox jComboBoxMalt10;
    private javax.swing.JComboBox jComboBoxMalt2;
    private javax.swing.JComboBox jComboBoxMalt3;
    private javax.swing.JComboBox jComboBoxMalt4;
    private javax.swing.JComboBox jComboBoxMalt5;
    private javax.swing.JComboBox jComboBoxMalt6;
    private javax.swing.JComboBox jComboBoxMalt7;
    private javax.swing.JComboBox jComboBoxMalt8;
    private javax.swing.JComboBox jComboBoxMalt9;
    private javax.swing.JComboBox jComboBoxRecipe;
    private javax.swing.JComboBox jComboBoxYeast;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel33;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel35;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JLabel jLabelRIBU;
    private javax.swing.JLabel jLabelRSRM;
    private javax.swing.JLabel jLabelRecipeID;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JSeparator jSeparator3;
    private javax.swing.JSeparator jSeparator4;
    private javax.swing.JSeparator jSeparator5;
    private javax.swing.JSeparator jSeparator6;
    private javax.swing.JSeparator jSeparator7;
    private javax.swing.JSeparator jSeparator8;
    private javax.swing.JTextField jTextFieldCaCl;
    private javax.swing.JTextField jTextFieldChalk;
    private javax.swing.JTextField jTextFieldDHopDay1;
    private javax.swing.JTextField jTextFieldDHopDay2;
    private javax.swing.JTextField jTextFieldDHopDay3;
    private javax.swing.JTextField jTextFieldDHopDay4;
    private javax.swing.JTextField jTextFieldDHopLbs1;
    private javax.swing.JTextField jTextFieldDHopLbs2;
    private javax.swing.JTextField jTextFieldDHopLbs3;
    private javax.swing.JTextField jTextFieldDHopLbs4;
    private javax.swing.JTextField jTextFieldEpsom;
    private javax.swing.JTextField jTextFieldGyp;
    private javax.swing.JTextField jTextFieldHopLbs1;
    private javax.swing.JTextField jTextFieldHopLbs10;
    private javax.swing.JTextField jTextFieldHopLbs2;
    private javax.swing.JTextField jTextFieldHopLbs3;
    private javax.swing.JTextField jTextFieldHopLbs4;
    private javax.swing.JTextField jTextFieldHopLbs5;
    private javax.swing.JTextField jTextFieldHopLbs6;
    private javax.swing.JTextField jTextFieldHopLbs7;
    private javax.swing.JTextField jTextFieldHopLbs8;
    private javax.swing.JTextField jTextFieldHopLbs9;
    private javax.swing.JTextField jTextFieldHopTime1;
    private javax.swing.JTextField jTextFieldHopTime10;
    private javax.swing.JTextField jTextFieldHopTime2;
    private javax.swing.JTextField jTextFieldHopTime3;
    private javax.swing.JTextField jTextFieldHopTime4;
    private javax.swing.JTextField jTextFieldHopTime5;
    private javax.swing.JTextField jTextFieldHopTime6;
    private javax.swing.JTextField jTextFieldHopTime7;
    private javax.swing.JTextField jTextFieldHopTime8;
    private javax.swing.JTextField jTextFieldHopTime9;
    private javax.swing.JTextField jTextFieldMPct1;
    private javax.swing.JTextField jTextFieldMPct10;
    private javax.swing.JTextField jTextFieldMPct2;
    private javax.swing.JTextField jTextFieldMPct3;
    private javax.swing.JTextField jTextFieldMPct4;
    private javax.swing.JTextField jTextFieldMPct5;
    private javax.swing.JTextField jTextFieldMPct6;
    private javax.swing.JTextField jTextFieldMPct7;
    private javax.swing.JTextField jTextFieldMPct8;
    private javax.swing.JTextField jTextFieldMPct9;
    private javax.swing.JTextField jTextFieldNaCl;
    private javax.swing.JTextField jTextFieldPTemp;
    private javax.swing.JTextField jTextFieldRName;
    private javax.swing.JTextField jTextFieldRRev;
    private javax.swing.JTextField jTextFieldRatio;
    private javax.swing.JTextField jTextFieldTG;
    private javax.swing.JTextField jTextFieldTargetTemp;
    private javax.swing.JTextField jTextFieldVol;
    // End of variables declaration//GEN-END:variables

}
